HTTP Client Action

Modified on Tue, 30 Jan, 2024 at 5:52 PM

The "HTTP Client Activity" offers a means to send REST requests to specific URLs, enabling interaction with any REST API. This versatile activity supports various HTTP methods, including:

  • POST
  • GET
  • PUT
  • DELETE
  • HEAD


Authentication Methods

The HTTP client also supports authentication mechanisms, including basic authentication and certificate-based authentication. To add authentication to your request, select the desired authentication type using the provided radio buttons and enter the necessary authentication details.


When employing certificate-based authentication, ensure that your private key and public key chain are entered in PEM format. You can find further information on the PEM format here. It's important to note that your private key should not have a password, as this is not currently supported.


Sending a POST Request to a JSON API

Here's an example demonstrating how to configure the HTTP client to send data to a JSON-based API using the POST method:

  1. Add a new HTTP Client Activity to your workflow.


  2. Enter the fully qualified URL of your service, such as https://example.com/api/method. Then, select the HTTP verb as POST.


  3. If you don't require authentication for this request, leave the default selection as None.
  4. Under "Headers," click Add to include your JSON content-type header.


  5. Next, add your request body in the appropriate field.
  6. Once all the required fields are filled in, click Save.


HTTP Proxies

In certain scenarios, you may need to utilize a proxy server to contact your API. The HTTP Client activity now supports the use of an HTTP proxy for making requests. To configure the use of a proxy, click the "Enable" button under the "Proxy Settings" section. Subsequently, input the details of your proxy server.

 

Output

The HTTP Client activity provides outputs that include the success status of the request and any data received from the API:

  • response_status_code: The resulting HTTP status code of the request.
  • response_body: The response body as text if returned by the request.
  • response_headers: An object with properties representing each of the response headers.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article