# 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

Select HTTP Client in the list and configure the connection.

## Configuration

Select your engine from the list and set the main and advanced settings.

Main settingsMain settings

| Property | Configuration |
| --- | --- |
| Base URL | Type in the base URL address you want to access.<br><br>Example: https://www.example.com/v1.0/<br><br>The second part of the URL needs to be set in the<br>Path parameter of the HTTP Client dataset<br>configuration.<br><br>You can also define a placeholder using the [Data Shaping Selector Language<br>syntax](https://help.qlik.com/talend/r/en-US/8.0/data-shaping-language-reference-guide/using-data-shaping-selector-language) to have some parts dynamically filled with the value<br>extracted from the incoming record. Example:<br><br>Base URL =<br>"https://{.input.job\_url}" and<br>Path =<br>"{.input.job\_url\_path}" |
| Authentication | Select one of these authentication methods depending on the server<br>security requirements:<br><br><ul> <li><span>No authentication</span>: no authentication is                              expected to access the server.</li> <li><span>Basic</span>: a username and a password are expected                              (see the <a href="https://www.rfc-editor.org/rfc/rfc2617" target="_blank">corresponding                              documentation</a>).</li> <li><span>Digest</span>: a username and a password are expected                              (see the <a href="https://www.rfc-editor.org/rfc/rfc2617" target="_blank">corresponding                              documentation</a>).</li> <li><span>Bearer Token</span>: a raw access token is expected.                              It will be carried into the HTTP Request header as                                 <kbd>Authorization: Bearer &lt;your token&gt;</kbd>.</li> <li><span>NTLM</span>: a username (that may contain a domain                              name) and a password are expected (see the <a href="https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/b38c36ed-2804-4868-a9ff-8dd3182128e4" target="_blank">corresponding                              documentation</a>).</li> <li><span>API Key</span>: 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:<ul> <li><span>Destination</span>: 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). </li> <li><span>Name</span>: Enter the name of the header or                                    query parameter.</li> <li><span>Prefix</span> (optional): Enter the prefix to                                    be added in front of the token (only if the                                       <span>Destination</span> is <span>Request                                       header</span>).</li> <li><span>Token</span>: Enter the authentication                                    token.</li> </ul></li> <li><span>OAuth 2.0</span> 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:<ul> <li><span>Flow</span>: The OAuth flow you want to                                    execute. Currently, only the <a href="https://www.rfc-editor.org/rfc/rfc6749#section-1.3.4" target="_blank">Client Credentials</a> flow                                    is supported.</li> <li><span>Authentication mode</span>: 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&amp;scope=xxxx'.</li> <li><span>Token endpoint</span>: </li> <li>Enter the authentication token using the format                                    'oauth2/mydomain.com/token'.</li> <li><span>Client ID</span> and <span>Client                                       secret</span>: Enter the client ID and client                                    secret.</li> <li><span>Additional parameters</span>: Enter the                                    additional attributes you want to add, like the                                       <kbd>scope</kbd> attribute for example.</li> </ul></li> </ul> |

Advanced settingsAdvanced settings

| Property | Configuration |
| --- | --- |
| Connection timeout (ms) | Type in the base URL address you want to access.<br><br>Example: https://www.example.com/v1.0/<br><br>The second part of the URL needs to be set in the<br>Path parameter of the HTTP Client dataset<br>configuration. |
| Read timeout (ms) | Sets the maximum waiting time in milliseconds for the response payload<br>to be received. An exception will occur if the timeout expires before there<br>is data available to read. |
| Bypass server certificate validation | When enabled, the server certificate is not validated by the client. It<br>is intended only for test purposes and thus should be disabled in production<br>environments. |
| Use a proxy | Enable this toggle so that the connection between the client and the<br>server is established through an HTTP or SOCKS proxy:<br><br><ul> <li><span>Proxy type</span>: select the type of proxy you want                              to use. The HTTP proxy support basic authentication.</li> <li><span>Proxy host</span> and <span>Proxy                                 port</span>: enter the address and port of the proxy.</li> <li><span>Proxy login</span> and <span>Proxy                                 password</span> (HTTP only): enter the credentials needed to                              authenticate to the proxy.</li> </ul> |
| Retry with exponential backoff | Select this option to automatically retry failed HTTP calls. If<br>selected, HTTP calls are retried if there is a timeout, or if the HTTP<br>status code is higher or equal to 400, however no retries are done for<br>401/403/511 errors which are authentication errors.<br><br><ul> <li><span>Initial backoff (ms)</span>: Enter the duration to                              wait, in milliseconds, before the first retry of the HTTP call.</li> <li><span>Backoff factor</span>: When an attempt fails, the                              duration to wait is multiplied by this factor in order to increase the                              delay between each call. If the factor is <kbd>1</kbd>,                              all delays will be the same.</li> <li><span>Maximum number of retries</span>: Enter the maximum                              number of attempts for a single HTTP query. The initial call should                              not be included in this number.</li> </ul><br><br>Example for the following configuration:<br><br>Intial backoff:<br>300 ms, Backoff factor:<br>2, and Maximum number of retries:<br>4<br><br>The HTTP Client connector does a first<br>GET operation on the server (first call). A connection timeout error is<br>returned, the retry mechanism is activated, and the connector waits for<br>300 milliseconds. A second attempt is then made (first retry). A 503 HTTP<br>response is returned, the wait duration is multiplied by 2, so the<br>connector waits for 600 milliseconds. A third attempt is made (second<br>retry). A 500 Internal server error is returned, the wait duration is<br>multiplied by 2, so the connector waits for 1200 milliseconds. A fourth<br>attempt is made (third retry), and this time it is successful. No<br>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

Dataset configurationDataset configuration

| Property | Configuration |
| --- | --- |
| Dataset name | Enter a<br>display name for the dataset. This name will be used as a unique identifier of<br>the dataset in all Talend Cloud apps. |
| Connection | Select<br>your connection in the list. If you are creating a dataset based on an existing<br>connection, this field is read-only. |
| Type | Select the type of dataset you want to create:<br><br><ul> <li> <span>Batch</span> if you want to execute the HTTP query                              once. The pipeline that uses this dataset will be a batch pipeline. </li> <li> <span>Streaming</span> 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 <span>Min poll                                 interval (ms)</span> field of the source dataset.</li> </ul> |

Main settingsMain settings

| Property | Configuration |
| --- | --- |
| HTTP method | Select an HTTP method in the list to specify the action to be<br>performed. |
| Path | Enter the second part of the URL you previously set in the configuration<br>of the connection on which this dataset is created. The concatenation of<br>both designates the resource you are targeting with this dataset.<br><br>The Base URL (connection) and<br>Path (dataset) values are concatenated, and a<br>/ character is added when needed.<br><br>You can also define a placeholder using the [Data Shaping Selector Language<br>syntax](https://help.qlik.com/talend/r/en-US/8.0/data-shaping-language-reference-guide/using-data-shaping-selector-language) to have some parts dynamically filled with the value<br>extracted from the incoming record. Example:<br><br>Base URL =<br>"https://{.input.job\_url}" and<br>Path =<br>"{.input.job\_url\_path}" |
| Path parameters | Enable this option to specify the extra parameters needed to complete the<br>Base URL or Path in the form of name-value pairs.<br><br>If the Base URL or Path contains a placeholder, you can define parameters<br>to replace these placeholders:<br><br><ul> <li><span>Name</span>: Enter the name of the placeholder to                                 be replaced.</li> <li><span>Value</span>: Enter the value you want to replace                                 the placeholder with. It can be a static value like                                    <kbd>contactEntity</kbd>, a value extracted from the                                 incoming record, like <kbd>{.input.entity.id}</kbd>, or                                 a mixture of both, like                                    <kbd>version{.input.api.version}</kbd>.</li> </ul><br><br>For example, with the base URL https://www.example.com<br>and the path /{api\_version}, you can set the path by<br>adding a parameter in this table, setting Name to<br>api\_version and Value to<br>v1.0. |
| Query parameters | Enable this option to specify the parameters that will be set in the<br>query URL after the ? character in the form of<br>name-value pairs. These values are automatically encoded.<br><br><ul> <li><span>Name</span>: Enter the name of the parameter.</li> <li><span>Value</span>: Enter the value of the parameter. It                              can be a static value like <kbd>UUID-1234567</kbd>, a                              value extracted from the incoming record, like                                 <kbd>{.input.user.id}</kbd>, or a mixture of both, like                                 <kbd>UUID-{.input.user.id}</kbd>.</li> </ul><br><br>Example: Query parameter name = entityId and query<br>parameter value = UUID-1234567 |
| Request headers | Enable this option to define some HTTP request headers as name-value<br>pairs. You can define each header to be either part of the main HTTP query<br>(Main), the authentication query<br>(Authentication, only available with<br>OAuth 2.0 authentication), or both queries<br>(Both).<br><br><ul> <li><span>Name</span>: Enter the name of the header.</li> <li><span>Value</span>: Enter the value of the header. It can                              be a static value like <kbd>text/html;                              charset=utf-8</kbd>, a value extracted from the incoming record,                              like <kbd>{.input.meta.content}</kbd>, or a mixture of                              both, like <kbd>text/{.input.document.format};                                 charset={.input.document.charset}</kbd>.</li> <li><span>Query</span>: Select the query on which this header                              configuration will be applied.</li> </ul><br><br>Example: Header name = Content-Type and header<br>value = text/html;charset=utf-8 |
| Request body | Enable this option if you want to include a message body in the request:<br><br><ul> <li> <div> <span>Text</span>: Enter the body of the message as plain                                 text in the text frame under the drop-down list. You can define a                                 placeholder using the <a href="https://help.qlik.com/talend/r/en-US/8.0/data-shaping-language-reference-guide/using-data-shaping-selector-language" target="_blank">Data Shaping Selector Language                                    syntax</a> to have some parts dynamically filled with the                                 value extracted from the incoming record. Example:                                 <pre><code><pre><code><code>id={.input.user.id}name={.input.user.name}  </code></code></pre></code></pre></div> </li> <li> <div> <span>JSON</span>: Enter the body of the message in the                                 JSON format in the text frame under the drop-down list. You can                                 define a placeholder using the <a href="https://help.qlik.com/talend/r/en-US/8.0/data-shaping-language-reference-guide/using-data-shaping-selector-language" target="_blank">Data Shaping Selector Language                                    syntax</a> to have some parts dynamically filled with the                                 value extracted from the incoming record. Example:<pre><code><pre><code><code>{ "id": "{.input.user.id}", "name": "{.input.user.name}", "age": "{.input.user.age}", }</code></code></pre></code></pre></div> </li> <li> <div> <span>XML</span>: Enter the body of the message in the                                 XML format in the text frame under the dropdown list. You can                                 define a placeholder using the <a href="https://help.qlik.com/talend/r/en-US/8.0/data-shaping-language-reference-guide/using-data-shaping-selector-language" target="_blank">Data Shaping Selector Language                                    syntax</a> to have some parts dynamically filled with the                                 value extracted from the incoming record.                                 Example:<pre><code><pre><code><code>&lt;user&gt; &lt;id&gt;{.input.user.id}&lt;/id&gt; &lt;name&gt;{.input.user.name}&lt;/name&gt; &lt;age&gt;{.input.user.age}&lt;/age&gt;&lt;/user&gt;</code></code></pre></code></pre></div> </li> <li> <p> <span>Form data</span> and                                    <span>x_www_urlencoded</span>: Create the body using a                                 multipart form with attribute name-value pairs or using a URL                                 encoded form with attribute name-value pairs. Enter the attribute                                 names and values in rows of the table under the drop-down list. You                                 can define a placeholder using the <a href="https://help.qlik.com/talend/r/en-US/8.0/data-shaping-language-reference-guide/using-data-shaping-selector-language" target="_blank">Data Shaping Selector Language                                    syntax</a> to have some parts dynamically filled with the                                 value extracted from the incoming record. </p> </li> <li> <span>Binary</span>: Select this option if you want to                              upload data files larger than 500MB in chunks. Once selected, the                                 <span>File path</span> field is displayed to let you                              specify a local upload folder.</li> </ul> |
| Response body format | Select the response body format from the drop-down list. The right<br>format allows the connector to parse and apply operations to the response.<br>Currently, text and JSON formats are supported.<br><br><ul> <li> <span>Text</span>: 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.</li> <li> <span>JSON</span>: Select this format if the response                              received has a JSON format. In that case the payload is translated                              into correctly parsed JSON records.</li> </ul> |
| Extract a sub-part of the response | Enter the path of a node to select a sub-element of the response. If the<br>element is an array, each element of the array will be looped over. For more<br>information about the syntax for entering the node name, see [Data Shaping Selector Language<br>syntax](https://help.qlik.com/talend/r/en-US/8.0/data-shaping-language-reference-guide/using-data-shaping-selector-language).<br><br>This field is optional and must remain empty to<br>retrieve the entire JSON response.<br><br>For an example on how to use it,<br>read [Additional information about how to extract data with HTTP Client](https://help.qlik.com/talend/en-US/connectors-guide/Cloud/additional-info-about-extracting-data-with-httpclient "You can configure the HTTP Client connector in order to return a specific part of the response body instead of the whole response payload using the Extract a sub-part of the response and Output key/value pairs parameters."). |
| Returned content | Select one of the following two options depending on the data returned<br>by the server.<br><br><ul> <li> <p> <span>Body</span>: If <span>Text</span> is                                 selected from the <span>Response body format</span>                                 dropdown list, a record with one string attribute named                                    <cite>body</cite> is generated and all the payload is copied in                                 it; If <span>JSON</span> is selected from the                                    <span>Response body format</span> dropdown list, a                                 record that represents the hierarchical structure of the parsed                                 document is generated. Limitation: If the body part in the main                                 flow exceeds 200MB, the record will be truncated and a warning will                                 be thrown. </p> </li> <li> <span>Status, headers, and body</span>: A record is                              generated with a status attribute (INT type) that contains the HTTP                              status code, a <cite>headers</cite> attribute that is a record with                              all response headers as nested attributes, and a <cite>body</cite>                              attribute that is either a simple string containing the full payload                              as text (if <span>Text</span> is selected from the                                 <span>Response body format</span> dropdown list) or a                              hierarchical object representing the parsed document (if                                 <span>JSON</span> is selected from the                                 <span>Response body format</span> dropdown list).                              Limitation: If the body part in the main flow exceeds 200MB, the                              record will be truncated and a warning will be thrown. </li> <li><span>Download file only</span>: Select this option to                              limit the returned content in the main flow and only download the HTTP                              response body as a file or to cache, without building a record in the                              main flow to save resources. This option is meant to be used in the                              on-premises component in <span>Talend Studio</span> and is not recommended in <span>Talend Cloud</span>.</li> </ul> |
| Output key/value pair | Select this option to return key/value pairs instead of the raw body of<br>the HTTP response. To enter a value for a node, add a row in the table by<br>clicking the plus button under the table, enter the name of the node in the<br>Name field, and enter the value in the<br>Value field.<br><br>The value can be from the<br>component input or from the HTTP response. Enter<br>"{.input.&lt;dssl\_path&gt;}" in the<br>Value field if the value is from the component<br>input or "{.response.&lt;dssl\_path&gt;}" if the<br>value is from the HTTP response.<br><br>In the example for the<br>Extract a sub-part of the JSON option, you can<br>retrieve the name and city values of the geologists by entering<br>.content in the Extract a sub-part<br>of the JSON field and adding the following two key/value<br>pairs in the table.<br><br><ul> <li> <kbd>"Name"</kbd>:<kbd>"{response.name}"</kbd> </li> <li> <kbd>"City"</kbd>:                                    <kbd>"{response.address.city}"</kbd> </li> </ul><br><br>When retrieving data from an HTTP server, you can specify the<br>format and content of the data retrieved using the schema, the<br>Guess schema button, the Response<br>body format option, the Returned<br>content option, the Extract a sub-part of the<br>response option, and the Output key/value<br>pairs option. For more information, see [tHTTPClient: configuration and output](https://help.qlik.com/talend/en-US/components/8.0/http/thttpclient-schema-and-output). |
| Forward input values | Select this option to pass the values received from the component input<br>to the subsequent component.<br><br>This option is available when<br>Output key/value pairs is selected. |

Advanced settingsAdvanced settings

| Property | Configuration |
| --- | --- |
| Accept redirections | Enable this option to apply [the HTTP Redirection rules](https://www.rfc-editor.org/rfc/rfc7231#page-54) on your resources.<br><br><ul> <li><span>Maximum number of redirects</span>: 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.</li> <li><span>Redirect only on same host</span>: Enable this option                              if you want redirections to be performed only when using the same                              host.</li> </ul> |
| Pagination | Select this option to enable the pagination strategy. For more<br>information about pagination strategy, see *Pagination* section<br>of [JIRA Server platform REST API<br>reference](https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/).<br><br>Note that pagination is only compliant with JSON<br>payload and the desired elements must be in an array in the JSON<br>payload.<br><br>You need to set the following options for pagination to<br>work properly.<br><br><ul> <li> <span>Pagination strategy</span>: Select the pagination                              strategy to be used:<ul> <li><span>Offset/limit</span>: This strategy retrieves                                    the elements starting at a specific position in pages of a                                    specific size. The <span>offset</span> parameter                                    specifies the beginning element in terms of the offset from the                                    first element; the <span>limit</span> parameter                                    specifies the maximum size of a page in terms of the number of                                    the elements. With this strategy applied, the pagination stops                                    when the last call returns 0 elements.</li> <li><span>Marker</span>: This strategy uses a "marker"                                    (often the ID of the last item retrieved) to fetch the next set                                    of results. The marker acts as a pointer to indicate where the                                    next page of data starts, allowing the API to return results                                    that come after the marker. With this strategy applied, the                                    pagination stops when the response contains the marker                                    element.</li> </ul><ul> <li><span>Next link</span>: This strategy provides a                                    "next link" (or URL) in the response, which the client can use                                    to retrieve the next set of results. The "next link" includes an                                    offset or a page number that the client can use to fetch the                                    next page. With this strategy applied, the pagination stops when                                    the response contains the next link element.</li> </ul></li> <li> <span>Location</span>: Specify the way to set the offset and                              the limit parameters, which can be <span>Query                                 parameters</span> or <span>In headers</span>.</li> <li> <span>Name of the offset</span>: Set the name of the                              parameter that will be used as the offset.</li> <li> <span>Value of the offset</span>: Set the offset. To start                              from the first element, set it to <span>0</span>. You can obtain                              the offset of a query from the incoming records using the DSSL                              expression <span>'{.input.last_page_info.offset}'</span>.</li> <li> <span>Name of the limit</span>: Set the name of the                              parameter that defines the maximum number of elements allowed in a                              page.</li> <li> <span>Value of the limit</span>: Set the limit, the maximum                              number of elements that can be returned in a page. The pagination will                              stop when a page is returned with 0 elements.</li> <li> <span>Path to elements</span>: Set the path to the JSON                              array that contains the desired elements. It must be a JSON array.                              With <span>offset/limit</span> strategy applied, the element                              specified by this parameter becomes the root regardless of the setting                              in <span>Extract a sub-part of the response</span> option.                              For instance, with <span>JIRA</span> in the                                 <span>Preset</span> field, setting <span>Path to                                 elements</span> to <kbd>.issue</kbd> retrieves the                              issues even if <span>Extract a sub-part of the                                 response</span> is set to <kbd>.key</kbd>                              (assuming that <cite>key</cite> is an attribute of the elements                              present in the issues).</li> <li> <span>Preset</span>: Select preset configuration for                              specific service that supports pagination strategy by selecting the                              corresponding service. To select a service, click the                                 <span>[...]</span> button next to this field and select                              the service. You can select one of the following services. <ul> <li> <span>BOX</span>: see <a href="https://developer.box.com/guides/api-calls/pagination/offset-based/" target="_blank">Offset-based Pagination</a>                                    for more information.</li> <li> <span>JIRA</span>: see <a href="https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/" target="_blank">JIRA Server platform REST API                                       reference</a> for more information.</li> <li> <span>OData</span>: see <a href="https://docs.oasis-open.org/odata/odata/v4.01/os/part1-protocol/odata-v4.01-os-part1-protocol.html" target="_blank">OData Version 4.01. Part 1:                                       Protocol</a> for more information.</li> </ul></li> <li> <span>Load selected preset</span>: Click this button to load                              the preset configuration selected in the <span>Preset</span>                              field.</li> </ul> |
| Normalize the JSON HTTP response | Select this option to normalize inconsistencies in the JSON payload in<br>order for the component to correctly parse these documents:<br><br><ul> <li><span>Normalize attributes</span>: allows you to convert a                              value to the expected data type.</li> <li><span>Normalize arrays</span>: allows you to filter on some                              elements of a JSON array.<p>Example: </p><div>If you configure the                                 component to retrieve <a href="https://help.qlik.com/talend/en-US/connectors-guide/Cloud/Content/Resources/attachments/httpclient_company_data.json">this JSON document</a>, these JSON                                 inconsistencies will be returned in the Job execution console:                                 <pre><code><pre><code><code>Some JSON inconsistencies has been identified:                                    .users.*.addresses is not consistently present in all objects.                                    .users.*.active is not consistently present in all objects.                                    .users.*.email is not consistently present in all objects.                                    .users.*.addresses is an array that contains items of several types: STRING, OBJECT.                                    .users.*.addresses.*.country is not consistently present in all objects.                                    .users.*.addresses.*.street is not consistently present in all objects.                                    .users.*.addresses.*.zipcode is found with varying types: STRING, INT.                                    Please, have a look to advanced settings JSON normalization to fix it.</code></code></pre></code></pre></div><p>To                                 prevent this, you could for example use the <span>Normalize                                    attributes</span> option to cast the attribute with the                                 path <span>.users.*.addresses</span> as an                                    <span>ARRAY</span> type, and the attribute with the                                 path <span>users.*.addresses.*.zipcode</span> as an                                    <span>INT</span> type even though some returned values                                 have a String type. You could also add a missing attribute, such as                                    <span>.users.*.active</span> (here you can cast it as a                                    <span>BOOLEAN</span> since it returns either                                    '<span>true</span>' or                                 '<span>false</span>').</p><p>You could also use the                                    <span>Normalize arrays</span> option to only keep the                                    <span>OBJECT</span> elements in                                    <span>.users.*.addresses</span> even though addresses                                 also contain some String types. </p></li> </ul><br><br>This option is available when JSON is<br>selected in the Response body format option in the<br>Basic settings of the component. |

## 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.

### In this section

* [Additional information about how to extract data with HTTP Client](https://help.qlik.com/talend/en-US/connectors-guide/Cloud/additional-info-about-extracting-data-with-httpclient)