Skip to main content

HTTP Request

Description

Using this activity, you can execute an HTTP call to initiate a request to a targeted web application. This activity enables interaction with the web application and facilitates retrieval of the requested data.

Design Time Configuration

Http request config

Inputs

  • Display text – Specify the activity name that shows in your process.

  • Host – Address for the target point. You can place custom URL segments between braces "" and provide values in URL segments.

  • Accept Format - Choose the following Format to receive the web API response from the drop-down.

    Supported formats are:

    FormatsDescription
    AnyFlexibility is provided in the response format, allowing the server to return data in any format supported or based on the client's preferences.
    JSON (JavaScript Object Notation) (Default)Structured data is transmitted between servers and clients using JSON, a lightweight format commonly used in web APIs. By default, sets this Format
    XML (eXtensible Markup Language)A markup language for encoding documents in a human-readable and machine-readable format, often used for representing structured data in HTTP requests.
    YAML (YAML Ain't Markup Language)It is a data serialization format commonly used for configuration files and data exchange in HTTP requests. It is easy to read by humans.
  • Method – Choose the request method for calling the API from drop-down.

    The following methods are currently supported:

    MethodsDescription
    GET (Default)Retrieves data from the server specified by the URL in the request, typically used for fetching resources.
    POSTSubmits data to be processed to the server specified by the URL, often used for creating new resources or submitting form data.
    PUTUpdates data on the server specified by the URL with the provided data, commonly used for replacing existing resources.
    DELETERemoves data specified by the URL from the server, typically used for deleting resources.
    HEADRetrieves metadata about the resource specified by the URL, similar to GET but without the response body, often used for checking resource availability or retrieving headers.
    OPTIONSRetrieves the HTTP methods and other capabilities supported by the server for the specified URL, commonly used for cross-origin resource sharing (CORS) preflight requests.
    PATCHApplies partial modifications to a resource specified by the URL, used for updating specific fields within an existing resource.
  • Timeout - Specifies the time (in seconds) for the request to complete. The default value is 10 seconds.

Query Params

It enables you to include custom query parameters in the request. It accepts in Key Value pair format, allowing for easy assignment of values to variables. Drag and drop functionality simplifies the process.

URL Segments

Specify the URL segments added to the host URL between braces ''. For instance, instead of writing the https://jsonplaceholder.typicode.com/posts/1 URL, you can write it as https://jsonplaceholder.typicode.com/posts/{id} and provide the value of the id parameter in the URL segments. These segments are accepted in Key-Value pair format, making assigning values to variables easy. The drag-and-drop functionality simplifies the process.

Cookies

You can now include Custom cookies in requests through drag-and-drop functionality. Key value pairs make assigning values to variables easy.

Authentication Type

Specify the authentication type for the request.

The following authentication types are supported:

Basic Authentication

  • Password - Specifies using basic authentication and provides the password.
  • Username - Specifies basic authentication and provides the user name.

Windows Authentication

  • Domain Name - The domain associated with the Windows credentials.
  • Domain Username - The user name associated with the Windows credentials.
  • Password - The Password associated with the Windows credentials.

OAuth 1.0

  • Consumer Key - Specify the identification key, the consumer key, used to identify a consumer with the service provider.
  • Consumer Secret - The consumer Secret establishes ownership of the key.
  • Signature Method- The consumer's Signature method to sign the request.
  • Token - The access token represents the permission to access the data for OAuth 1.0.
  • Token Secret - Token secret used to establish ownership of the given access token.

OAuth 2.0

  • Token - The access token represents the permission to access the data for OAuth 2.0.
  • Header Prefix - Specify the authorization header before the access token. For example Bearer

Headers

It enables you to include custom headers in the request. It accepts values to variables in Key Value pair format, allowing easy assignment. Drag and drop functionality simplifies the process.

Body

Body of the request.

  • none

  • form-data - The Form Data property of the body in an HTTP request is used to send key-value pairs as data, typically when submitting a form. This encoding type is usually applied when you set the Content-Type to multipart/form-data. The server processes the form data as part of the HTTP request body.

  • x-www-form-urlencoded - The application/x-www-form-urlencoded is a content type used to encode key-value pairs in an HTTP request body, especially for submitting form data in POST requests. When this format is used, each key-value pair is encoded in a specific way, making it easier to send data through URLs or HTTP requests.

    • Url Encoded Params - Enables you to include URL-encoded parameters in the request.
  • raw - The different Raw types in the body of an HTTP request specify the format in which it sends the raw data. Here's an explanation of each type.

    • Body Format – It specifies the Format of the request's body. The following formats are supported:
    Body FormatDescription
    TextPlain text data without specific formatting or structure.
    JavascriptJavaScript code that can be executed by the server or processed as data.
    JSONJavaScript Object Notation is a lightweight data-interchange format.
    application/XMLXML data formatted according to the XML specification.
    text/XMLXML data formatted as text, often used for human-readable XML.
    HTMLHypertext Markup Language structures web page content.

Outputs

  • Result – Response Result returned by HTTP call.
  • Raw Response Headers – Response Headers returned by HTTP call in string format.
  • Raw Response Cookies – Response Cookies returned by HTTP call in string format.
  • Error Message – Transport or other non-HTTP error generated while attempting to request.
  • Status Code – Status Code returned by HTTP call.
note

If the server returns an HTTP status code of 0, it indicates connectivity or network issues, not an actual response.

Example

Below is an illustrative example demonstrating the utilization of this activity.

Http request example