HTTP Client properties
HTTP Client connection
Select HTTP Client in the list and configure the connection.
Configuration
Select your engine from the list and set the main and advanced settings.
| Property | Configuration |
|---|---|
| Base URL |
Type in the base URL address you want to access. Example: https://www.example.com/v1.0/ The second part of the URL needs to be set in the Path parameter of the HTTP Client dataset configuration. You can also define a placeholder using the Data Shaping Selector Language syntax to have some parts dynamically filled with the value extracted from the incoming record. Example: Base URL = "https://{.input.job_url}" and Path = "{.input.job_url_path}" |
| Authentication | Select one of these authentication methods depending on the server
security requirements:
|
| Property | Configuration |
|---|---|
| Connection timeout (ms) |
Type in the base URL address you want to access. Example: https://www.example.com/v1.0/ The second part of the URL needs to be set in the Path parameter of the HTTP Client dataset configuration. |
| Read timeout (ms) | Sets the maximum waiting time in milliseconds for the response payload to be received. An exception will occur if the timeout expires before there is data available to read. |
| Bypass server certificate validation | When enabled, the server certificate is not validated by the client. It is intended only for test purposes and thus should be disabled in production environments. |
| Use a proxy |
Enable this toggle so that the connection between the client and the server is established through an HTTP or SOCKS proxy:
|
| Retry with exponential backoff | Select this option to automatically retry failed HTTP calls. If
selected, HTTP calls are retried if there is a timeout, or if the HTTP
status code is higher or equal to 400, however no retries are done for
401/403/511 errors which are authentication errors.
Example for the following configuration: Intial backoff: 300 ms, Backoff factor: 2, and Maximum number of retries: 4 The HTTP Client connector does a first GET operation on the server (first call). A connection timeout error is returned, the retry mechanism is activated, and the connector waits for 300 milliseconds. A second attempt is then made (first retry). A 503 HTTP response is returned, the wait duration is multiplied by 2, so the connector waits for 600 milliseconds. A third attempt is made (second retry). A 500 Internal server error is returned, the wait duration is multiplied by 2, so the connector waits for 1200 milliseconds. A fourth attempt is made (third retry), and this time it is successful. No additional attempt is made, and the response is returned. |
After configuring the connection, give it a display name (mandatory) and a description (optional).
HTTP Client dataset
| Property | Configuration |
|---|---|
| Dataset name | Enter a display name for the dataset. This name will be used as a unique identifier of the dataset in all Talend Cloud apps. |
| Connection | Select your connection in the list. If you are creating a dataset based on an existing connection, this field is read-only. |
| Type | Select the type of dataset you want to create:
|
| Property | Configuration |
|---|---|
| HTTP method | Select an HTTP method in the list to specify the action to be performed. |
| Path |
Enter the second part of the URL you previously set in the configuration of the connection on which this dataset is created. The concatenation of both designates the resource you are targeting with this dataset. The Base URL (connection) and Path (dataset) values are concatenated, and a / character is added when needed. You can also define a placeholder using the Data Shaping Selector Language syntax to have some parts dynamically filled with the value extracted from the incoming record. Example: Base URL = "https://{.input.job_url}" and Path = "{.input.job_url_path}" |
| Path parameters |
Enable this option to specify the extra parameters needed to complete the Base URL or Path in the form of name-value pairs. If the Base URL or Path contains a placeholder, you can define parameters
to replace these placeholders:
For example, with the base URL https://www.example.com and the path /{api_version}, you can set the path by adding a parameter in this table, setting Name to api_version and Value to v1.0. |
| Query parameters | Enable this option to specify the parameters that will be set in the
query URL after the ? character in the form of
name-value pairs. These values are automatically encoded.
Example: Query parameter name = entityId and query parameter value = UUID-1234567 |
| Request headers | Enable this option to define some HTTP request headers as name-value
pairs. You can define each header to be either part of the main HTTP query
(Main), the authentication query
(Authentication, only available with
OAuth 2.0 authentication), or both queries
(Both).
Example: Header name = Content-Type and header value = text/html;charset=utf-8 |
| Request body | Enable this option if you want to include a message body in the request:
|
| Response body format | Select the response body format from the drop-down list. The right
format allows the connector to parse and apply operations to the response.
Currently, text and JSON formats are supported.
|
| Extract a sub-part of the response | Enter the path of a node to select a sub-element of the response. If the
element is an array, each element of the array will be looped over. For more
information about the syntax for entering the node name, see Data Shaping Selector Language
syntax. This field is optional and must remain empty to retrieve the entire JSON response. For an example on how to use it, read Additional information about how to extract data with HTTP Client. |
| Returned content | Select one of the following two options depending on the data returned
by the server.
|
| Output key/value pair | Select this option to return key/value pairs instead of the raw body of
the HTTP response. To enter a value for a node, add a row in the table by
clicking the plus button under the table, enter the name of the node in the
Name field, and enter the value in the
Value field. The value can be from the component input or from the HTTP response. Enter "{.input.<dssl_path>}" in the Value field if the value is from the component input or "{.response.<dssl_path>}" if the value is from the HTTP response. In the example for the
Extract a sub-part of the JSON option, you can
retrieve the name and city values of the geologists by entering
.content in the Extract a sub-part
of the JSON field and adding the following two key/value
pairs in the table.
When retrieving data from an HTTP server, you can specify the format and content of the data retrieved using the schema, the Guess schema button, the Response body format option, the Returned content option, the Extract a sub-part of the response option, and the Output key/value pairs option. For more information, see tHTTPClient: configuration and output. |
| Forward input values | Select this option to pass the values received from the component input
to the subsequent component. This option is available when Output key/value pairs is selected. |
| Property | Configuration |
|---|---|
| Accept redirections | Enable this option to apply the HTTP Redirection rules on your resources.
|
| Pagination | Select this option to enable the pagination strategy. For more
information about pagination strategy, see Pagination section
of JIRA Server platform REST API
reference. Note that pagination is only compliant with JSON payload and the desired elements must be in an array in the JSON payload. You need to set the following options for pagination to work properly.
|
| Normalize the JSON HTTP response | Select this option to normalize inconsistencies in the JSON payload in
order for the component to correctly parse these documents:
This option is available when JSON is selected in the Response body format option in the Basic settings of the component. |
HTTP Client source/destination configuration
- Die on error (status code different from 2xx):
Enable this option if you want unsuccessful HTTP response status codes (different from 2xx) to raise an error at runtime. This option is disabled by default.