HTTP Client

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.

http-client-overview.png

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

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input 

Binary or Document

 

  • Min: 0

  • Max: 1

  • Mapper

  • File Reader

  • JSON Parser

Each input document includes one of the following:

  • Details associated with the data required from the target RESTful server.

  • Details associated with the data that must be replaced or created in the target RESTful server.

  • Object ID to be deleted at the REST API service endpoint.

Output

Binary or Document

 

  • Min: 1

  • Max: 1

  • Mapper

  • Union

  • Copy

  • Join

  • Filter

Each output document contains one of the following:

  • Data retrieved from the RESTful web server.

  • Response data from the REST API service endpoint detailing the status of the request.

  • Details related to the business objects.

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:

  • Stop Pipeline Execution: Stops the current Pipeline execution if the Snap encounters an error.

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the remaining records.

  • Route Error Data to Error View: Routes the error data to an error view without stopping the Snap execution.

When you select the Enable debug checkbox, the information about the executed request and response is written to the error view in case of errors.

Learn more about Error handling in Pipelines.

Snap Settings