Skip to main content Skip to complementary content
Close announcements banner

HTTP Client properties

Properties to configure to be able to send an HTTP request to the server end and get the corresponding response information from the server end.

HTTP client connection

Selection
Property Configuration
Selection Select or enter HTTP Client.
Configuration
Property Configuration
Engine Select your engine in the list.
Main 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:
  • No authentication: no authentication is expected to access the server.
  • Basic: a username and a password are expected (see the corresponding documentation).
  • Digest: a username and a password are expected (see the corresponding documentation).
  • Bearer Token: a raw access token is expected. It will be carried into the HTTP Request header as Authorization: Bearer <your token>.
  • NTLM: a username (that may contain a domain name) and a password are expected (see the corresponding documentation).
  • API Key: uses a flexible way to pass an API key token to the server, including the ability to select where to pass it, its name and a prefix:
    • Destination: Select where the token will be set: either in a HTTP header with the given name, or in a HTTP query parameter with the given name (not recommended as the token might be visible in the logs).
    • Name: Enter the name of the header or query parameter.
    • Prefix (optional): Enter the prefix to be added in front of the token (only if the Destination is Request header).
    • Token: Enter the authentication token.
  • OAuth 2.0 automatically manages the retrieval and renewal of the access token against the OAuth server then passes it to the target endpoint as a Bearer token:
    • Flow: The OAuth flow you want to execute. Currently, only the Client Credentials flow is supported.
    • Authentication mode: For all authentication methods supported, the flow and scope parameters are set in the body using the format 'application/x-www-form-urlencoded' with keys 'grant_type=xxx&scope=xxxx'.
    • Token endpoint:
    • Enter the authentication token using the format 'oauth2/mydomain.com/token'.
    • Client ID and Client secret: Enter the client ID and client secret.
    • Additional parameters: Enter the additional attributes you want to add, like the scope attribute for example.
Advanced settings
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:

  • Proxy type: select the type of proxy you want to use. The HTTP proxy support basic authentication.
  • Proxy host and Proxy port: enter the address and port of the proxy.
  • Proxy login and Proxy password (HTTP only): enter the credentials needed to authenticate to the proxy.
Description
Property Configuration
Description Enter a display name (mandatory) and a description (optional) for the connection.

HTTP Client dataset

Dataset configuration
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:
  • Batch if you want to execute the HTTP query once. The pipeline that uses this dataset will be a batch pipeline.
  • Streaming if you want to execute the HTTP query every N milliseconds in a streaming pipeline. The pipeline that uses this dataset will be a streaming pipeline and you will be able to define the polling interval in milliseconds in the Min poll interval (ms) field of the source dataset.
Main settings
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:
  • Name: Enter the name of the placeholder to be replaced.
  • Value: Enter the value you want to replace the placeholder with. It can be a static value like contactEntity, a value extracted from the incoming record, like {.input.entity.id}, or a mixture of both, like version{.input.api.version}.

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.
  • Name: Enter the name of the parameter.
  • Value: Enter the value of the parameter. It can be a static value like UUID-1234567, a value extracted from the incoming record, like {.input.user.id}, or a mixture of both, like UUID-{.input.user.id}.

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).
  • Name: Enter the name of the header.
  • Value: Enter the value of the header. It can be a static value like text/html; charset=utf-8, a value extracted from the incoming record, like {.input.meta.content}, or a mixture of both, like text/{.input.document.format}; charset={.input.document.charset}.
  • Query: Select the query on which this header configuration will be applied.

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:
  • TEXT: Enter the body of the message as plain text. You can 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:
    id={.input.user.id}
    name={.input.user.name}
  • JSON: Enter the body of the message in the JSON format. You can 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:
    {
        "id": "{.input.user.id}",
        "name": "{.input.user.name}",
        "age": {.input.user.age},
    }
  • XML: Enter the body of the message in the XML format. You can 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:
    <user>
       <id>{.input.user.id}</id>
       <name>{.input.user.name}</name>
       <age>{.input.user.age}</age>
    </user>
  • Form data: Create the body using a multipart form with attribute name and value pairs. You can define a placeholder using the Data Shaping Selector Language syntax to have some parts dynamically filled with the value extracted from the incoming record.
  • X_WWW_FORM_URLENCODED: Create the body using a URL encoded form with attribute name and value pairs. You can define a placeholder using the Data Shaping Selector Language syntax to have some parts dynamically filled with the value extracted from the incoming record.
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:
  • TEXT: Select this format to return a plain text message. In that case the response payload is not parsed and it will not be possible to extract a sub-part from it nor to use {.response...} placeholders in the Output key/value pair parameters.
  • JSON: Select this format if the response received has a JSON format. In that case the payload is translated into correctly parsed JSON records.
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:
  • Body: If the Answer body format is TEXT, a record with one String attribute named body is generated and all the payload is copied in it.

    If the Answer body format is JSON, a record that represents the hierarchical structure of the parsed document is generated.

  • Status, headers and body: A record is generated with a status attribute (Int type) that contains the HTTP status code, a headers attribute that is a record with all response headers as nested attributes, and a body attribute that is either a simple string containing the full payload as text (Answer body format is TEXT) or a hierarchical object representing the parsed document.
Output key/value pair Enable this option to return key/value pairs instead of the raw body of the HTTP response.
  • Name: Enter the name of the attribute to output.
  • Value: Enter the value of the attribute. It can be a static value, a value extracted from the incoming record, or the result of the current HTTP query. The input record value or the response of the current HTTPCall are identified by their prefix:
    • {.input}: selector on input record
    • {.response}: selector on response

Example:

Name = id

Value = {.response.user.id}

Advanced settings
Property Configuration
Accept redirection Enable this option to apply the HTTP Redirection rules on your resources.
  • Maximum number of redirects: Set the maximum number of redirects that the connector should follow. If there are more redirections than configured, the last one is returned as result of the query.
  • Redirect only on same host: Enable this option if you want redirections to be performed only when using the same host.
Pagination Enable this option to implement and configure pagination.
  • Preset: Select the predefined configuration for the popular services supporting pagination. Once selected, click Load selected preset to update the pagination form for the selected environment.

    For more information, read the Box, JIRA, and OData documentation.

  • Pagination strategy: It is the pagination strategy that has been implemented in the HTTP service you are querying. Offset/limit is the only supported strategy for now.
  • Location: Select where the offset and limit parameters are set. Either in Query parameters or in Headers.
  • Name of the offset: Enter the parameter's name that will be used as offset.
  • Value of the offset: Set the initial offset value. Enter 0 to start at the very first set.

    You can retrieve this value from the incoming record using the Data Shaping Selector Language syntax.

    Example: {.input.last_page_info.offset}

  • Name of the limit: Enter the parameter's name that will be used to define the maximum number of returned elements by page.
  • Value of the limit: Set the maximum number of returned elements in a page. The pagination will stop when a page is returned with 0 elements.
  • Path to elements: Define the path to the JSON array that contains the returned elements. It must be a JSON array. The Offset/limit will count the number of elements in this array and continue or stop the pagination when it is empty. When the Offset/limit pagination is enabled and this parameter is set, it becomes the root of the Extract a sub-part of the response in the Main configuration.

    Example:

    If you select JIRA/search pagination, issues are returned in the .issues array by default, so you have to enter this value in Path to elements. However, if you want only the Jira keys to be returned, set .key in Extract a sub-part of the response and keys will be returned even if key is an attribute of elements present in issues.

HTTP Client source/destination configuration

When HTTP Client is used as a source or destination dataset in your pipeline, an additional option can be enabled while retrieving/sending data from/to your web server:
  • 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.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!