HTTP Client
Description
The HTTP client step performs a simple call to a base URL with options appended as shown below:
http://<URL>?param1=value1¶m2=value2&..
The result is stored in a String field with the specified name.
Options
The following table describes the options available for the HTTP client step:
Option |
Description |
---|---|
Step name |
Name of the step; this name has to be unique in a single transformation |
URL |
The base URL string |
Accept URL from field? |
Enable this option if you want to get the URL from a previous step. |
URL field name |
The name of the incoming field that contains the URL |
Connection timeout |
|
Socket timeout |
The number of seconds to wait if no data is returned from the server. |
Connection close wait time |
|
Result fieldname |
The name of the field to store results |
HTTP status code field name |
The name of the field to store the HTTP response code (e.g. 200, 404) |
Response time (milliseconds) field name |
The name of the field to store the response time |
Http Login |
The username to be passed during HTTP (Basic) authentication |
HTTP Password |
The password to be passed during HTTP (Basic) authentication |
Proxy Host |
The hostname of the Proxy Server to be used |
Proxy Port |
The port number of the Proxy Server to be used |
Parameters |
Area where you define the parameter name-value pairs to pass on the URL |
Custom HTTP Headers |
Area where you define optional HTTP headers |
Note: The data of the input fields can be escaped by the Calculator step and the function "Mask XML content from string A" or "Escape HTML content"
FAQ
The HTTP client step doesn't do anything
Q: The HTTP client step doesn't do anything, how do I make it work?
A: The HTTP client step needs to be triggered. Use a Row generator step generating e.g. 1 empty row and link that with a hop to the HTTP client step.
The HTTP client step and SOAP
Q: Does the HTTP client support SOAP?
A: No, it just calls an URL with arguments. Future steps may provide SOAP functionality, Work is underway on a WebService step supporting WSDL. The first experimental version appeared in PDI v2.5.0
Example
samples/transformations/HTTP Client - simple retrieval example.ktr