HTTP Request

Read with AI
All docs in one file (llms-full.txt)
HttpRequest #I/O #Node
HTTP Request

It GETs the URL you specify and emits the body of the response to Body as a string. GET is the only method, and there is no way to specify a request body or headers. The timeout is 10 seconds.

What triggers a send

  • Auto send (default ON) — sends automatically when the URL changes. Merely loading a project and having a saved URL restored does not send
  • The Send button — the button on the node sends the URL as it stands at that moment
  • The Send port — sends when a trigger fires. It works regardless of whether Auto send is ON or OFF

You can either write the URL in the field on the node body or feed it into the URL port, and the field on the body is committed with the Enter key or when the field loses focus (the instant it is committed is the “URL changed” timing).

If a new send starts while one is in flight, the previous request is cut off and only the latest one survives. That way you never get the ordering break where the song has changed but the previous song’s response arrives afterwards.

If the URL is not an absolute URL beginning with http:// or https://, nothing is sent and the node says so.

The four outputs

  • Body — the response body on success. It only comes out when the value differs from last time
  • Status — the HTTP status code of the response. Also only on a change
  • Done — fires once when it succeeded and the body was emitted
  • Error — fires once on a connection failure, a timeout, or a 4xx/5xx

Even on failure, Body holds the last successful value (so the text does not disappear from the screen). A request that ran to the end fires exactly one of Done or Error. A request that was cut off partway fires neither.

The small text on the node shows that a request is in flight, the status of the response and the character count of the body, and the reason for a failure.

Combine it with Text Format for assembling the URL and JSON Path for pulling values out of the JSON that comes back, and you can run an external API along a single line.

Input ports

Port IDType
URLstring
Sendtrigger

Output ports

Port IDType
Bodystring
Statusint
Donetrigger
Errortrigger

Scriptable members

PathType
urlInputstring
currentUrlstring
currentAutoSendbool

Synapse Apps (scripting)

await synapse.modules.create({ type: "HttpRequest" })

Pages linking here

Also referenced from