/n software Adapters for BizTalk
/n software Adapters for BizTalk
Questions / Feedback?

RequestParams Property

Parameters to add to the POST or PUT request.

Data Type

String

Default Value

""

Remarks

The RequestParams property specifies one or more parameters to add to the POST or PUT request. This property is only applicable when the HTTPMethod property is set to POST or PUT.

To specify additional parameters set this property to one or more name value pairs. Set one pair on each line. For instance:

name1=value1
name2=value2

The adapter will format a request with parameters slightly differently depending on whether the request is made by the Send or Receive adapter.

Note: To have complete control over the data being sent set PostData instead.

Send Adapter

When sending a POST or PUT request the BizTalk message body will always be used as the last parameter regardless of the values specified in RequestParams. If no values are set here then a request will be made with only one parameter which is the content of the message. Several examples and additional details follow. Basic Example: Setting the RequestParams to a value of:

name1=value1
name2=value2

Will result in a HTTP request like:

POST / HTTP/1.1
Host: www.nsoftware.com
Accept-Encoding: gzip, deflate
User-Agent: IPWorks HTTP Component - www.nsoftware.com
Connection: close
Content-Type: multipart/form-data; boundary="boundaryV+iTxA=="
Content-Length: 335

--boundaryV+iTxA==
Content-Disposition: form-data; name="name1"
Content-Type: text/plain
	
value1
--boundaryV+iTxA==
Content-Disposition: form-data; name="name2"
Content-Type: text/plain
	
value2
--boundaryV+iTxA==
Content-Disposition: form-data
Content-Type: application/octet-stream
	
message body
--boundaryV+iTxA==--

Notice that the default "Content-Type" for the individual request parameters is "text/plain", and the default "Content-Type" for the message form variable is "application/octet-stream" and has no defined name attribute. See the following examples for further details.

Custom Request Parameter Content-Type Values:

When sending requests the RequestParams may optionally include a custom Content-Type value. The syntax is:


[ContentType]name=value

For instance setting RequestParams to a value of:

[text/html]name1=value1
[my/type]name2=value2
name3=value3
Will result in a HTTP request like:
POST / HTTP/1.1
Host: www.nsoftware.com
Accept-Encoding: gzip, deflate
User-Agent: IPWorks HTTP Component - www.nsoftware.com
Connection: close
Content-Type: multipart/form-data; boundary="boundaryQDNEUw=="
Content-Length: 439

--boundaryQDNEUw==
Content-Disposition: form-data; name="name1"
Content-Type: text/html
	
value1
--boundaryQDNEUw==
Content-Disposition: form-data; name="name2"
Content-Type: my/type
	
value2
--boundaryQDNEUw==
Content-Disposition: form-data; name="name3"
Content-Type: text/plain
	
value3
--boundaryQDNEUw==
Content-Disposition: form-data
Content-Type: application/octet-stream
	
message body
--boundaryQDNEUw==--

Note the updated Content-Type header values for the "name1" and "name2" parameters.

Custom Content-Type and Name Values for the BizTalk Message Variable:

The default Content-Type value for the BizTalk Message form variable is "application/octet-stream" and no "name" attribute is defined in the Content-Disposition header. These can be explicitly defined in the ContentType and ContentFilename properties. These properties are applicable to the BizTalk Message form variable even if RequestParams is not set. For instance setting:

And leaving RequestParams unspecified (no parameters) will result in a HTTP request like:


POST / HTTP/1.1
Host: www.nsoftware.com
Accept-Encoding: gzip, deflate
User-Agent: IPWorks HTTP Component - www.nsoftware.com
Connection: close
Content-Type: multipart/form-data; boundary="boundaryVAJHkA=="
Content-Length: 142

--boundaryVAJHkA==
Content-Disposition: form-data; name="myfile.txt"
Content-Type: text/html
	
message body
--boundaryVAJHkA==--

Receive Adapter

In the receive adapter the RequestParams are used to form the body of the POST or PUT request using the more lightweight encoding "application/x-www-form-urlencoded". For instance, setting the request parameters to:

name1=value1
name2=value2

Will result in a HTTP request like:


POST / HTTP/1.1
Host: www.nsoftware.com
Accept-Encoding: gzip, deflate
User-Agent: IPWorks HTTP Component - www.nsoftware.com
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 25

name1=value1&name2=value2

To maintain complete control over the POST body PostData may be set instead.

 
 
Copyright (c) 2020 /n software inc. - All rights reserved.
/n software Adapters for BizTalk - Version 16.0 [Build 7355]