
We assume that you have already learned what is described in:
If you want to find the right Other component for your purposes, see Others Comparison.
HTTPConnector sends HTTP requests to a web server and receives responses
| Component | Same input metadata | Sorted inputs | Inputs | Outputs | Each to all outputs1) | Java | CTL |
|---|---|---|---|---|---|---|---|
| HTTPConnector | - | no | 0-1 | 0-1 | - | no | no |
1) Component sends each data record to all connected output ports.
HTTPConnector sends HTTP requests to a web server and receives responses. Request is written in a file or in the graph itself or it is received through a single input port, . If request is defined in a file or in the graph, response is written to a response file (single HTTP interaction). If request is received through a port, response is also sent out through a single output port (mutli HTTP interaction) or it can also be written to temporary files and information about these files is sent to the specified output field.

| Port type | Number | Required | Description | Metadata |
|---|---|---|---|---|
| Input | 0 | 1) | For URL, parameters for Query, or Request body | Any12) |
| Output | 0 | 1) | For response or for data records with URL of files containing response | Any23) |
Legend:
1): Either both or neither of them must be connected.
2): If connected, Input field need not be
specified only if the first field (with URL from field) is of string data type.
3): If connected, Output field need not be
specified only if the first field is of string data type.
| Attribute | Req | Description | Possible values |
|---|---|---|---|
| Basic | |||
| URL from input field | [ 1)] | Name of a string field
specifying the target URL you wish to retrieve.
Field value may contain placeholders in the form
*{<field name>}. See the section called “Reading of Remote Files”
for the URL format. The HTTP, HTTPS, FTP
and SFTP protocols are supported.
| |
| URL | [ 1)] | URL of the HTTP server the component connects to.
May contain one or more placeholders in the following form:
*{<field name>}. See the section called “Reading of Remote Files”
for the URL format. The HTTP, HTTPS, FTP
and SFTP protocols are supported.
| |
| Request method | Method of request. | GET (default) | POST | |
| Add input fields as parameters | Specifies whether aditional parameters should be added to the URL. | false (default) | true | |
| Add input fields as parameters to | Specifies whether input fields should be added to the query string or method body. Parameters can only be added to the method body in case that Request method is set to POST. | QUERY (default) | BODY | |
| Ignore fields | Specifies which input fields are not added as parameters. List of input fields separated by semicolon is expected. | ||
| Additional HTTP header properties | Additional properties of the request that will be sent
to the server. A dialog is used to create it, the final form is a sequence of
key=value pairs separated by comma and the
whole sequence is surrounded by curly braces. | ||
| Charset | Character encoding of the input/output files | ISO-8859-1 (default) | other encoding | |
| Input field | [ 2)] | Name of the field of the input metadata from which the request content is received. Must be of string data type. May be used for multi HTTP requests. | |
| Output field | [ 2)] | Name of the field of the output metadata to which the response response is sent. Must be of string data type. May be used for multi HTTP responses. | |
| Request content | [ 3)] | Request content defined directly in the graph. If defined, Output file URL must be specified. | |
| Input file URL | [ 3)] | URL of the file from which single HTTP request is read. See URL File Dialog. | |
| Output file URL | [ 3)] | URL of the file to which single HTTP response is written. It is used if either Input file URL or Request content is defined. See URL File Dialog. The output files are not deleted automatically and must be removed by hand or as a part of transformation. | |
| Append output | false | By default, any new response overwrites the older one.
If you switch this attribute to true, new
response is appended to the olders. Is applied to output files
only. | |
| Advanced | |||
| Authentication method | HTTP BASIC (default) | HTTP DIGEST | ANY | ||
| Username | Username required to connect to the server | ||
| Password | Password required to connect to the server | ||
| Store response file URL to output field | By default, when output port is connected, response is
sent to it directly. If this attribute is switched to
true, response is written to temporary
files as specified in the Directory for response
files and the Prefix for response
names attributes. Only the information about these
temporary files is sent to the specified Output
field (URLs of the files is sent to the field).
This is necessary in case the response body is too large to be
stored in a single string data field. Developer is responsible
to delete all these temp files. | false (default) | true | |
| Directory for response files | Name of the directory to which all output files with HTTP responses will be written. Output files are not deleted automatically and need to be deleted by hand. | java.io.tmpdir system property (default) | other directory | |
| Prefix for response names | Prefix that will be used in the name of each output file with HTTP response. To this prefix, distinguishing numbers are appended. Output files are not deleted automatically and need to be deleted by hand. | "http-response-" (default) | other prefix | |
[ 1)] One of these must be specified. In case that both are specified, URL is ignored. [ 2)] If both ports are connected, the component makes Multi HTTP requests.
One input record (request) corresponds to one output record (response).
If multi HTTP request is not made, single HTTP request is made instead.
If the first input field or the first output field are of [ 3)] Component makes single HTTP request. Only one of the Request content and Input file URL attributes may be specified at once. If single HTTP request is not made, multi HTTP request is made instead. | |||