HTTP Tasks
Properties Configuration Settings
The HTTP component provides a flexible HTTP client to send and receive data to web servers.
Remarks
The HTTP task implements a highly configurable HTTP client that is capable of sending and receiving data to and from web servers. Support includes issuing simple GET requests as well as defining custom form and file parameters to be POSTed to server. URL defines the location to which the request is made.
The task supports HTTP 1.0, 1.1, and 2.0 which can be configured in the HTTPVersion property.
The HTTPMethod property defines the HTTP method to use. Possible values are:
- DELETE
- GET (default)
- HEAD
- POST
- PUT
- TRACE
Getting Data From the Server
In both the Send Task and the Receive Task if HTTPMethod is set to GET the request is issued to the server specified by URL. Additional custom headers may be specified in the request by setting OtherHeaders.
The response received by the task will be saved to LocalFile if specified. Otherwise it will populate the variables specified by TransferredHeaders and TransferredData
Sending Data To the Server
When HTTPMethod is set to POST or PUT data will be sent to the server. 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 Task
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 this:
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
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:
- ContentType to "text/html"
- AttachedFile to "C:\myfile.txt
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 Task
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. Additional Settings
In addition to the basic operation as discussed above the task supports a variety of other settings that control authentication, proxy settings, and other behavior. Some of additional features include:
- Authentication (NTLM, Kerberos, Digest, Basic) via the AuthScheme, User, and Password properties.
- Full Proxy/Firewall support using the HTTPProxy and Firewall properties.
- CustomRequestMethod provides support for custom HTTP methods.
- Specify redirect behavior with FollowRedirects.
- Add cookies to the request via Cookies.
- Configurable UserAgent.
- And many more!
Receiver Property List
The following is the full list of the properties of the receiver task with short descriptions. Click on the links for further details.
Authorization | The Authorization string to be sent to the server. |
AuthScheme | The authorization scheme to be used when server authorization is to be performed. |
ContentType | Defines the Content-Type header in the request. |
Cookies | The cookies to be sent in the HTTP request. |
Firewall | A set of properties related to firewall access. |
FollowRedirects | Determines what happens when the server issues a redirect. |
HTTPMethod | The HTTP method used for the request. |
HTTPProxy | A set of properties related to proxy access. |
HTTPVersion | The HTTP version to use. |
LocalFile | The path to a local file for download. |
LogFile | The file to write logging information to at runtime. |
LogMode | What information gets logged during component execution. |
OAuthAuthorization | OAuth Authorization Information. |
Other | Defines a set of configuration settings to be used by the component. |
OtherHeaders | Other headers as determined by the user. |
Overwrite | Whether or not the task should overwrite the output file. |
Password | A password if authentication is to be used. |
PostData | The data to be posted to the server. |
RequestParams | Parameters to add to the POST or PUT request. |
ResponseInfo | String denoting the name of the variable which contains the last server response. |
RuntimeLicense | Specifies the component runtime license key. |
SSLAcceptServerCert | Instructs the component to unconditionally accept the server certificate that matches the supplied certificate. |
SSLAcceptServerCertAcceptAny | Tells the component to accept any server certificate. |
SSLCert | The certificate to use for client authentication during the SSL handshake. |
Timeout | A timeout for the component. |
URL | The URL to which the request is made. |
User | A user name if authentication is to be used. |
Sender Property List
The following is the full list of the properties of the sender task with short descriptions. Click on the links for further details.
AttachedFile | A file to include in the POST data. |
Authorization | The Authorization string to be sent to the server. |
AuthScheme | The authorization scheme to be used when server authorization is to be performed. |
ContentType | Defines the Content-Type header in the request. |
Cookies | The cookies to be sent in the HTTP request. |
Firewall | A set of properties related to firewall access. |
FollowRedirects | Determines what happens when the server issues a redirect. |
HTTPMethod | The HTTP method used for the request. |
HTTPProxy | A set of properties related to proxy access. |
HTTPVersion | The HTTP version to use. |
LocalFile | The path to a local file for download. |
LogFile | The file to write logging information to at runtime. |
LogMode | What information gets logged during component execution. |
OAuthAuthorization | OAuth Authorization Information. |
Other | Defines a set of configuration settings to be used by the component. |
OtherHeaders | Other headers as determined by the user. |
Overwrite | Whether or not the task should overwrite the output file. |
Password | A password if authentication is to be used. |
PostData | The data to be posted to the server. |
RequestParams | Parameters to add to the POST or PUT request. |
RuntimeLicense | Specifies the component runtime license key. |
SSLAcceptServerCert | Instructs the component to unconditionally accept the server certificate that matches the supplied certificate. |
SSLAcceptServerCertAcceptAny | Tells the component to accept any server certificate. |
SSLCert | The certificate to use for client authentication during the SSL handshake. |
StatusLine | The first line of the last server response. |
Timeout | A timeout for the component. |
TransferredData | The body of the HTTP response. |
TransferredHeaders | The full set of headers as received from the server. |
URL | The URL to which the request is made. |
User | A user name if authentication is to be used. |
Configuration Settings
The following is a list of configuration settings for the task with short descriptions. Click on the links for further details.
Accept | A list of acceptable MIME types for the request. |
AcceptEncoding | Used to tell the server which types of content encodings the client supports. |
AllowHTTPCompression | This property enables HTTP compression for receiving data. |
AllowHTTPFallback | A list of acceptable MIME types for the request. |
ChunkSize | Specifies the chunk size in bytes when using chunked encoding. |
CustomRequestMethod | Specifies the HTTP method to be used. |
EncodeURL | If set to true the URL will be encoded by the component. |
IfModifiedSince | A date determining the maximum age of the desired document. |
KerberosSPN | The Service Principal Name for the Kerberos Domain Controller. |
LogDebugData | Whether to log debug data. |
LogErrorBody | Whether to include the body of an error in the log message. |
MaxRedirectAttempts | Limits the number of redirects that are followed in a request. |
Pragma | A browser/server specific header line (optional). |
Range | The byte-range to be sent to the server. |
Referer | Referer URL/document (optional). |
ResponseBodyAlwaysAvailable | Whether the response body is always available. |
SubmitErrorAsMessage | Whether errors are submitted as BizTalk messages. |
TransferredDataLimit | The maximum of data to be transferred. |
UseChunkedEncoding | Enables or Disables HTTP chunked encoding for transfers. |
UserAgent | Information about the user agent (browser). |
ReuseSSLSession | Determines if the SSL session is reused. |
SSLCipherStrength | The minimum cipher strength used for bulk encryption. |
SSLEnabledCipherSuites | The cipher suite to be used in an SSL negotiation. |
SSLEnabledProtocols | Used to enable/disable the supported security protocols. |
SSLIncludeCertChain | Whether the entire certificate chain is included in the SSLServerAuthentication event. |
SSLSecurityFlags | Flags that control certificate verification. |
TLS12SignatureAlgorithms | Defines the allowed TLS 1.2 signature algorithms when UseInternalSecurityAPI is True. |
TLS12SupportedGroups | The supported groups for ECC. |
TLS13KeyShareGroups | The groups for which to pregenerate key shares. |
TLS13SignatureAlgorithms | The allowed certificate signature algorithms. |
TLS13SupportedGroups | The supported groups for (EC)DHE key exchange. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
LocalHost | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
TcpNoDelay | Whether or not to delay when sending packets. |
UseInternalSecurityAPI | Tells the component whether or not to use the system security libraries or an internal implementation. |