In this article
Overview
The HTTP Client Snap is an advanced REST Snap that enables you to send HTTP requests to a server and receive corresponding HTTP responses. It integrates all commonly used HTTP methods, including DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT, and TRACE.
We highly recommend that you use the HTTP Client Snap as a replacement for the REST Snaps.
Snap Type
The HTTP Client Snap is a Transform-type Snap that transforms the data passed through the HTTP request.
Prerequisites
A valid account with the required permissions.
Support for Ultra Pipelines
Works in Ultra Pipelines.
Limitations
The HTTP Client Snap hides the Authorization headers in the debug information for Basic Authentication and Digest Authentication Accounts because of security considerations.
If you specify the Authorization headers manually in the Snap or through the Secured Headers Account, then the headers are displayed in the debug information, but the values are hidden as follows:
Behavior Change
With the 433patches21307
update, pagination evaluation occurs before sending the output to the output view. Therefore, if snap.out.totalCount
is part of the Has next or any other pagination properties, the Snap will not include the count in the output corresponding to the request that produced the output document.
Known Issues
This Snap fails with the
Name may not be null
error when the key-value pair values are empty for the x-www-form-urlencoded Entity Type.The AWS Sig V4 Account does not support Virtual Private Cloud for the HTTP Client Snap.
Snap Views
Type | Format | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Binary or Document |
|
| Each input document includes one of the following:
|
Output | Binary or Document |
|
| Each output document contains one of the following:
When you include a second output view, the Snap uses this view to output the debug information by capturing the request and response. |
Error | Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab:
Learn more about Error handling in Pipelines. |
Snap Settings
Asterisk ( * ): Indicates a mandatory field.
Suggestion icon (): Indicates a list that is dynamically populated based on the configuration.
Expression icon ( ): Indicates the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.
Add icon ( ): Indicates that you can add fields in the field set.
Remove icon ( ): Indicates that you can remove fields from the field set.
Upload icon ( ): Indicates that you can upload files.
Field Name | Field Type | Field Dependency | Description | ||
---|---|---|---|---|---|
Label* Default Value: HTTP Client | String | None. | Specify a unique name for the Snap. | ||
Request Method* Default Value: GET | String/Expression/Suggestion | None. | Specify a custom method or choose one of the following HTTP request methods:
| ||
URI*
| String/Expression | None. | Specify the service endpoint URL of the REST API. You can provide the URL in one of the following ways:
You can use the canonical name (CNAME) for URI so it's not necessary for the URL to end with The Snap finds the value at the JSON path "$.widget.id" in the input data and replaces "%s" in the URL with the value. You can connect the File Reader and JSON Parser Snaps upstream of the HTTP Client Snap and prepare the following JSON file to the File Reader Snap: [ { "widget": { "id": "111", "name": "foo" } } { "widget": { "id": "555", "name": "bar" } } ] "https://www.example.com/data/v27.0/sobjects/Account" The URL for this Snap must be valid. If the URL contains any special characters, such as
We recommend you to use the former (encodeURIComponent) method to escape the special characters. | ||
Query Parameters | Use this field set to add query parameters to be included in the request. This is optional and can either be defined directly in the URL, as separate parameters or both. | ||||
Parameter Name Default Value: N/A | String/Expression | N/A | Specify the name of the query parameter. | ||
Parameter Value Default Value:N/A | String/Expression | N/A | Specify the value to assign to the parameter. | ||
HTTP Headers | Use this field set to create the HTTP header key-value pairs required for defining the headers for different types of input (JSON, PDF, DOCX, and so on). If you want to specify only content-type headers, you can configure the Multipart Content-Type property instead. | ||||
Header Name
| String/Expression/Suggestion | N/A | Specify the name of the HTTP header. Alternatively, select one of the following options from the suggestion list:
This Snap accepts default value | ||
Header Value Default Value: N/A | String/Expression | N/A | Specify the value for the HTTP header. | ||
Enable debug
| Checkbox | N/A | Select this checkbox to include the information about the executed request and response in the output document (under the | ||
Use form encoding for spaces Default Value: Deselected | Checkbox | N/A | Select this checkbox to enable the Snap to encode any space characters in query parameters using the plus sign (+) instead of the percent-encoding (%20). On selecting this checkbox, the Snap preserves whatever encoding has already been made. So, if you place a plus symbol in the query portion URL or percent-encodes ( For example, when the base HTTP Get URI is: http://domain.com/path?$filter="+ SourceRef1 eq 'W1179'"
Learn more about encoding of query parameters. | ||
Prevent URL encoding Default Value: Deselected | Checkbox | N/A | Select this checkbox to prevent the Snap from automatic URL encoding of the input URI. Enable this setting to use an already encoded URI. URL encoding encodes the same character in different encodings based on its location within the URL. The specific segments of the URL that apply here are the PATH portion and the QUERY portion: When you deselect this checkbox, the following are some of the characters that are automatically encoded by the Snap: | ||
HTTP Entity | An HTTP entity is the message body you can send in a request or receive from a response. An entity represents both binary and character content. The POST and PUT methods use entities. | ||||
Entity Type
| Dropdown list | N/A | Choose one of the following entity types to include in the request body.
| ||
Multipart Subtype
| String/Expression | Appears on selecting multipart for Entity Type. | Specify the MIME subtype for multipart, which specifies the nature of the message parts and their interrelationship. | ||
Multipart Form | Appears on selecting multipart for Entity Type. Use this field set to configure the fields required to upload multiple files and text. Learn more about Multipart Upload. By default, the Snap Settings display the fields required to upload a file. The data that is sent to the server using this entity type uses the following encoding pattern:
| ||||
Type
| Dropdown list | Appears on selecting multipart for Entity Type. | Choose either of the following multipart types to initiate the upload:
| ||
Key
| String/Expression | Appears on selecting multipart for Entity Type. | Specify the key for the multipart form-data needed to upload a file. The HTTP Client uses multipart entity to achieve the file upload. The form-data of its multipart entity contains key-value pairs. Upload and multipart file key depend on the service endpoint. | ||
Value Default Value: N/A
| String/Expression | Appears on selecting multipart for Entity Type. | Specify the file or text to be uploaded. If Multipart Type is FILE, the following are applicable:
If Multipart Type is a TEXT, then:
For Text part upload using Form Upload, the HTTP Entity and Filename to be used are ignored. | ||
Content Type
| String/Expression/Suggestion | Appears on selecting multipart for Entity Type. | Select the content type headers for the data in the body of the multipart HTTP request. If you leave this field blank or enter an incorrect content type, some endpoints might respond with a The available options are:
| ||
Form | Use this field set to define key-value pairs for the URL-encoded form entity type. | ||||
Key Default Value: N/A | String/Expression | Appears on selecting x-www-form-urlencoded for Entity Type. | Specify the key of the form entry. | ||
Value Default Value: N/A | String/Expression | Appears on selecting x-www-form-urlencoded for Entity Type. | Specify the value for the key defined above. | ||
Raw Entity Default Value: $ | String/Expression | Appears on selecting raw for Entity Type. | Specify the body to send in the request. If the raw entity is from an input document, the document is converted into JSON. | ||
File Default Value: N/A | String/Expression | Appears on selecting binary for Entity Type. | Specify or upload the file to send in the Post payload. | ||
Pagination | Properties to define pagination settings. Learn more about Pagination. | ||||
Has Next Default Value: N/A | String/Expression | N/A | Specify the boolean expression to indicate whether there is a next page. Learn more about Has Next in action, Retrieving Contact Information from HubSpot Using Upstream Values . With the This field is null-safe; if the evaluated value is null, or if there is no value provided in Has Next field, the Snap stops the pagination. | ||
Total Pages to Fetch Default Value: N/A | Integer/Expression | N/A | Specify the maximum number of pages to fetch. The Snap stops fetching the next page if either the maximum number of pages is reached or the Has Next condition evaluates to | ||
Override URI
| Checkbox | N/A | Select this checkbox to enable the URI to be overridden with the specified Next URI for each pagination request. | ||
Reuse request parameters
| Checkbox | N/A | Select this checkbox to enable the Snap to reuse the specified URI parameters in the pagination requests. You can use the Override Parameters table to overrirde some of them. | ||
Override Headers | Define the headers to be overidden or added in the next pagination request. Headers with the same name are overwritten and new headers are appended. If the value is empty, the header is removed. The header value is evaluated against the response document. | ||||
Name | String/Expression/Suggestion | N/A | Specify the name of the header to be updated or added. | ||
Value | String/Expression | N/A | Specify the value of the header to be udpated or added. | ||
Pagination Interval (seconds)
| Integer | N/A | Specify the interval in seconds between the requests for each page. | ||
Client Settings | Additional settings for the HTTP Client. | ||||
Connection | Properties related to the connection to be established. | ||||
Cookie Policy
| Dropdown list | N/A | Select a Cookie Policy from the following options:
| ||
Trust all certificates
| Checkbox | N/A | Select this checkbox to trust all certificates, such as self-signed certificates. | ||
Read Timeout (seconds)
| Integer | N/A | Specify the number of seconds the Snap must wait before terminating the request because of a failure to read from the target service. | ||
Connection Timeout (seconds)
| Integer | N/A | Specify the number of seconds for which the Snap must wait before aborting the request due to a failure to establish a connection to the target endpoint or service. | ||
Retry | Properties for handling retries. | ||||
Retry Condition
| Dropdown list | N/A | Select one of the following options to handle connection and error responses:
| ||
Maximum Attempts
| Integer | N/A | Specify the maximum number of attempts the Snap must make to receive a response. If the attempts do not result in a response, the Snap terminates the request. | ||
Retry Interval (seconds)
| Integer | N/A | Specify the number of seconds the Snap must wait between two successive requests. A retry happens only when the previous attempt resulted in an exception. | ||
Automatically retry on 429 responses
| Checkbox | N/A | Select this checkbox to automatically retry the | ||
Use Retry-After header for 429
| Checkbox | N/A | Select this checkbox to enable the Snap to follow the | ||
Redirects | Properties for handling redirections. | ||||
Follow redirects
| Checkbox | N/A | Select this checkbox to accept the response and redirect the request. | ||
Follow original HTTP method
| Checkbox | Appears on selecting the Follow redirects checkbox. | Select this checkbox to enable the Snap to use the original HTTP method to do the redirect request. Otherwise, the GET method is used. | ||
Maximum Number of Redirects
| Integer/Expression | N/A | Specify the maximum number of redirects to allow. | ||
Allow relative redirect
| Checkbox | N/A | Select this checkbox to determine whether relative redirects should be allowed. The HTTP specification requires the location value to be an absolute URI. | ||
Allow circular redirect
| Checkbox | N/A | Select this checkbox to allow circular redirects to the same location. | ||
Output | Properties that define the display of the output. | ||||
Response Type | Dropdown list | Choose one of the following response types:
| |||
Extract entity as Documents Default Value: Selected | Checkbox | Appears on selecting JSON for Response Type. | Select this checkbox to extract the response entity as an output document as per the specified JSON path. If the extracted value is a list, it is split. | ||
Write unsuccessful response to Error View Default Value: Deselected | Checkbox | N/A | Select this checkbox to treat all unsuccessful responses (308, 4xx, and 5xx) as errors and write them to the error view. | ||
Include current cookies Default Value: Selected | Checkbox | N/A | Select this checkbox to include current cookies in each output document. | ||
Snap Execution Default Value: Execute only | Dropdown list | N/A | Select one of the following three modes in which the Snap executes:
|
Troubleshooting
Error | Reason | Resolution |
---|---|---|
Stack trace error in the Snap:
| The HTTP Client Snap sends | Provide |
Failed to execute the HTTP request. | The Service URL must have a protocol, such as http://, https://. | Check the Snap properties. Specifically, check your entry in the Service URL field. |
<Service_URL>: Name or service not known. This means that the service URL you entered is not accessible. | ||
Failure: Validation errors: property_map.settings.serviceUrl.value: Could not compile expression: <Service_URL> | The Snap settings are not correct. Encountered extraneous input ':' at line 1:5; expecting={<EOF>, '||', '&&', '^', '==', '!=', '>', '<', '>=', '<=', '+', '-', '*', '/', '%', '?', 'instanceof', 'in', 'matches', '[', '(', '.', PropertyRef}. This means that you turned expressions on () when entering the string value into the Service URL field. | Fix the Snap configuration and try executing again. Check the expression syntax. Ensure that your service URL is a proper expression; or turn off the expression control (). Learn more about Using Expressions. |
The provided URI is invalid. | Illegal character in schema name. | Verify that the URI and parameters that you provide are syntactically correct. |
Status codes | ||
URL Parse Exception - 403 | The Service URL path might be containing any of the following special characters: !, =, %, #, $, ^&()_¢äâêîôûñç¡¿ÉÙËǨ°¸ðø©¢¾A+²½µ®§÷¶þ | To escape the special characters, use the global function encodeURIComponent on any variables that might contain special characters so that they are encoded properly. |
status code = 404 | Phrase = NOT FOUND, refer to the error_entity field in the error view document for more details. This means that your service URL does not point to the correct endpoint. | Check the values of Snap properties. Specifically, check your service URL. |
status code = 404 | Phrase = NOT FOUND, refer to the error_entity field in the error view document for more details. This means that your service URL does not point to the endpoint that it should. | Check the values of Snap properties. Specifically, check your service URL. |
status code = 406 | NOT ACCEPTABLE. This means that the endpoint is not receiving any details from upstream Snaps. | Ensure that you have valid references in the HTTP entity field. |
status code = 409 | CONFLICT, refer to the error_entity field in the error view document for more details. This happens when you already have the resource that you want to create in the target endpoint. | Verify the values in the Snap configuration. |
Too many Requests - 429 | There are too many requests to the endpoint. | Wait for the retry to succeed. The HTTP Client Snap extracts the response header and automatically retries when it encounters status 429. By default, the retry interval (Retry-After) is specified in the HTTP response header. If no value is available for Retry-After, then the Snap’s Retry Interval value is used. |
Examples
Snap Pack HistoryRelease
Snap Pack Version
Date
Type
Updates
May 2024
main26341
Stable
Updated and certified against the current SnapLogic Platform release.
February 2024
436patches25508
Latest
Enhanced the HTTP Client Snap to optimize the memory usage by accumulating the Request History
objects only when you select the Enable debug checkbox. Now, the Snap displays debug information and lint warnings only (in both Error view and Output view) when you select the Enable debug checkbox.
February 2024
463patches25211
Latest
Enhanced the GraphQL Client Snap to include detailed stack trace, error message, and reason within the Snap error view output.
February 2024
main25112
Stable
Updated and certified against the current SnapLogic Platform release.
November 2023
435patches25047
Latest
Fixed an issue that caused the HTTP Client Snap to fail when the Basic Authentication account password contained special characters.
November 2023
435patches24708
Latest
Added support for the SSL OAuth2 Account.
The HTTP Client and GraphQL Client Snaps now support accessing usernames and passwords from the Basic Authentication account. The HTTP Client Snap also has this capability for the Digest Authentication, NTLM, SSL, and Google Service accounts.
Enhanced the API Suite OAuth2 Account with the Send client data as Basic Auth header checkbox to pass the client data as a part of the Basic Authentication header when generating a token.
November 2023
435patches24208
Latest
Fixed an issue with the HTTP Client Snap that caused incorrect parsing of the boundary
parameter by some REST endpoints. If you need to specify a character set, enter it in the individual parts of the request, as the charset
parameter has been removed from the multipart content-type.
November 2023
435patches23943
Latest
Fixed an issue with the GraphQL Client Snap that displayed a null pointer exception when the Header authenticated checkbox in the OAuth2 Account is deselected. The Snap now passes the credentials appropriately using URL parameters when the Header authenticated field is deselected.
November 2023
main23721
Stable
Added the Google Service Account to the HTTP Client Snap, which enables you to connect to various Google Cloud endpoints such as Analytics 4 and Compute Engine.
August 2023
434patches23079
Latest
Fixed an issue with the SnapLogic SSL Account for the HTTP Client Snap where a blank keystore or truststore URL caused an error during account configuration.
August 2023
434patches22631
Latest
Fixed an issue with the HTTP Client Snap that displayed incorrect cookie information, with a null value in the cookies when you have duplicate cookies in the header. The Snap now displays the cookie information correctly.
August 2023
main22460
Stable
Updated and certified against the current SnapLogic Platform release.
May 2023
433patches22065
Latest
Fixed an issue with the GraphQL Client Snap that caused an error even when the variable value was defined in the previous Snap.
May 2023
433patches21959
Latest
Fixed an issue with the HTTP Client Snap that caused an intermittent connectivity issue, which resulted in a 404 error
.
May 2023
433patches21860
Latest
Fixed an issue with the HTTP Client Snap where the Snap now conceals the additional authentication headers in the debug information for Secured Headers Account.
May 2023
433patches21346
Latest
Fixed an issue with the HTTP Client Snap where the validation of the SSL Account for a specified Keystore or Truststore value failed despite providing the correct password.
May 2023
433patches21307
Latest
Fixed an issue with the HTTP Client Snap that caused pagination to fail when the next Snap in the pipeline could modify the input document (for example, the Mapper Snap).
Behavior Change:
With the 433patches21307
, pagination evaluation occurs before sending the output to the output view. Therefore, if snap.out.totalCount
is part of the Has next or any other pagination properties, the Snap will not include the count in the output corresponding to the request that produced the output document.
May 2023
433patches21140
Latest
Fixed an issue affecting the HTTP Client Snap, which caused it to hang for an extended period when the user-agent contained the term java
.
The HTTP Client Snap is enhanced with the Prevent URL encoding checkbox. This checkbox enables you to control whether the Snap should automatically encode the URL or prevent the URL encoding based on your preference.
May 2023
main21015
Stable
Introduced the GraphQL Client Snap, which enables you to query a GraphQL endpoint and retrieve data. This Snap features a built-in query builder to help you efficiently build queries.
February 2023
432patches20818
Latest
Fixed an issue with the HTTP Client Snap that caused encoding of spaces in the query portion of an URL with a plus sign (+) instead of percent-encoding (%). This fix changes the default behavior to percent-encoding through the Use form encoding for spaces checkbox, which is deselected by default. Select this checkbox to enable the Snap to encode any space characters in query parameters using the plus sign (+).
Updated the HTTP Client Snap to stop sending unnecessary headers in GET requests that do not have an entity defined.
February 2023
432patches20054
Latest
For Snaps using AWS Signature V4 accounts, DNS canonical names are now supported for S3 buckets.
February 2023
main19844
Stable
Upgraded with the latest SnapLogic Platform release.
November 2022
431patches19006
Latest
The HTTP Client Snap does not fail when making a PATCH request containing an empty response body and location in the Headers. The Snap checks the entity length if the response entity is empty and skips the data conversion.
November 2022
main18944
Stable
The HTTP Client Snap now accepts the default value */*
for the Accept
header, which communicates to the server that the Snap can handle all forms of response content types.
October 2022
430patches18454
Latest and Stable
Introduced the API Suite Snap Pack that contains the HTTP Client Snap. This Snap unifies all supported HTTP methods: GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE, and PATCH that you can execute on a REST API service endpoint.
Release | Snap Pack Version | Date | Type | Updates |
---|---|---|---|---|
May 2024 | main26341 | Stable | Updated and certified against the current SnapLogic Platform release. | |
February 2024 | 436patches25508 |
| Latest | Enhanced the HTTP Client Snap to optimize the memory usage by accumulating the |
February 2024 | 463patches25211 |
| Latest | Enhanced the GraphQL Client Snap to include detailed stack trace, error message, and reason within the Snap error view output. |
February 2024 | main25112 |
| Stable | Updated and certified against the current SnapLogic Platform release. |
November 2023 | 435patches25047 |
| Latest | Fixed an issue that caused the HTTP Client Snap to fail when the Basic Authentication account password contained special characters. |
November 2023 | 435patches24708 |
| Latest |
|
November 2023 | 435patches24208 |
| Latest | Fixed an issue with the HTTP Client Snap that caused incorrect parsing of the |
November 2023 | 435patches23943 |
| Latest | Fixed an issue with the GraphQL Client Snap that displayed a null pointer exception when the Header authenticated checkbox in the OAuth2 Account is deselected. The Snap now passes the credentials appropriately using URL parameters when the Header authenticated field is deselected. |
November 2023 | main23721 |
| Stable | Added the Google Service Account to the HTTP Client Snap, which enables you to connect to various Google Cloud endpoints such as Analytics 4 and Compute Engine. |
August 2023 | 434patches23079 |
| Latest | Fixed an issue with the SnapLogic SSL Account for the HTTP Client Snap where a blank keystore or truststore URL caused an error during account configuration. |
August 2023 | 434patches22631 |
| Latest | Fixed an issue with the HTTP Client Snap that displayed incorrect cookie information, with a null value in the cookies when you have duplicate cookies in the header. The Snap now displays the cookie information correctly. |
August 2023 | main22460 |
| Stable | Updated and certified against the current SnapLogic Platform release. |
May 2023 | 433patches22065 |
| Latest | Fixed an issue with the GraphQL Client Snap that caused an error even when the variable value was defined in the previous Snap. |
May 2023 | 433patches21959 |
| Latest | Fixed an issue with the HTTP Client Snap that caused an intermittent connectivity issue, which resulted in a |
May 2023 | 433patches21860 |
| Latest | Fixed an issue with the HTTP Client Snap where the Snap now conceals the additional authentication headers in the debug information for Secured Headers Account. |
May 2023 | 433patches21346 |
| Latest | Fixed an issue with the HTTP Client Snap where the validation of the SSL Account for a specified Keystore or Truststore value failed despite providing the correct password. |
May 2023 | 433patches21307 |
| Latest | Fixed an issue with the HTTP Client Snap that caused pagination to fail when the next Snap in the pipeline could modify the input document (for example, the Mapper Snap). Behavior Change: |
May 2023 | 433patches21140 |
| Latest |
|
May 2023 | main21015 |
| Stable | Introduced the GraphQL Client Snap, which enables you to query a GraphQL endpoint and retrieve data. This Snap features a built-in query builder to help you efficiently build queries. |
February 2023 | 432patches20818 |
| Latest |
|
February 2023 | 432patches20054 |
| Latest | For Snaps using AWS Signature V4 accounts, DNS canonical names are now supported for S3 buckets. |
February 2023 | main19844 |
| Stable | Upgraded with the latest SnapLogic Platform release. |
November 2022 | 431patches19006 |
| Latest | The HTTP Client Snap does not fail when making a PATCH request containing an empty response body and location in the Headers. The Snap checks the entity length if the response entity is empty and skips the data conversion. |
November 2022 | main18944 |
| Stable | The HTTP Client Snap now accepts the default value |
October 2022 | 430patches18454 |
| Latest and Stable | Introduced the API Suite Snap Pack that contains the HTTP Client Snap. This Snap unifies all supported HTTP methods: GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE, and PATCH that you can execute on a REST API service endpoint. |