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:
Example: Base URL = https://www.example.com Path = /{api_version} Parameter name = api_version Parameter value = 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 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 Header value = text/html; charset=utf-8 Query = Main |
Request body | Enable this option if you want to include a message body in the request:
|
Response body format | Select the body format that corresponds to the type of payload expected
in the response. Selecting the right format allows the connector to parse
and apply operations to the records returned:
|
Extract a sub-part of the response |
(Available only if the answer body format is JSON or XML) If the body response is parsed as JSON or XML, it is possible to only return a sub-part of the response payload. The Data Shaping Selector Language syntax is used to extract the value. If an array is detected, items are returned one after the other. |
Returned content | Depending on the information you need to receive from the server, select
one of these options:
|
Output key/value pair | Enable this option to return key/value pairs instead of the raw body of
the HTTP response.
Example: Name = id Value = {.response.user.id} |
Property | Configuration |
---|---|
Accept redirections | Enable this option to apply the HTTP Redirection rules on your resources.
|
Pagination | Enable this option to implement and configure pagination.
|
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.