/n software Tasks for SSIS
/n software Tasks for SSIS
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 task 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 AttachedFile will always be used as the last parameter regardless of the values specified in RequestParams. 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==--

Notice that the default "Content-Type" for the individual request parameters is "text/plain" 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==--

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

Custom Content-Type and Name Values for the AttachedFile Variable:

The default Content-Type value for the AttachedFile form variable is "application/octet-stream". This can be explicitly defined in the ContentType property. 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
	
file contents
--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) 2019 /n software inc. - All rights reserved.
/n software Tasks for SSIS - Version 16.0 [Build 7240]