Using $.send.http
in workflows
You can send HTTP requests in Node.js code steps using $.send.http()
.
$.send.http()
accepts an object with all of the following properties:
await
the execution of the HTTP requests in your workflow. We’ll collect every $.send.http()
call and defer those HTTP requests, sending them after your workflow finishes.
Using $.send.http
in component actions
If you’re authoring a component action, you can deliver data to an HTTP destination using $.send.http
.
$.send.http
functions the same as $.send.http
in workflow code steps:
HTTP Destination delivery
HTTP Destination delivery is handled asynchronously, separate from the execution of a workflow. However, we deliver the specified payload to HTTP destinations for every event sent to your workflow. Generally, this means it should only take a few seconds for us to send the event to the destination you specify. In some cases, delivery will take longer. The time it takes to make HTTP requests sent with$.send.http()
does not count against your workflow quota.
HTTP request and response logs
Below your code step, you’ll see both the data that was sent in the HTTP request, and the HTTP response that was issued. If you issue multiple HTTP requests, we’ll show the request and response data for each.What if I need to access the HTTP response in my workflow?
Since HTTP requests sent with$.send.http()
are sent asynchronously, after your workflow runs, you cannot access the HTTP response in your workflow.
If you need to access the HTTP response data in your workflow, use axios
or another HTTP client.
Timeout
The timeout on HTTP request sent with$.send.http()
is currently 5 seconds. This time includes DNS resolution, connecting to the host, writing the request body, server processing, and reading the response body.
Any requests that exceed 5 seconds will yield a timeout
error.
Retries
Currently, Pipedream will not retry any failed request. If your HTTP destination endpoint is down, or returns an error response, we’ll display that response in the observability associated with the Destination in the relevant step.IP addresses for Pipedream HTTP requests
These IP addresses are tied to requests sent with
$.send.http
only, not other HTTP requests made from workflows. To whitelist standard HTTP requests from Pipedream workflows, use VPCs.$.send.http()
, the traffic will come from one of the following IP addresses: