Get HTTP header

I/O and network Pure
Get HTTP header
Headers(HTTP headers)
Value
Name

Description

Pure function returning the first value of the named header, or an empty string if the header is not set. Header names are matched case-insensitively.

When to use

Use Get HTTP header to read a single-valued header from an incoming request or response — Content-Type, Authorization, X-Signature, and the like. When a header can legitimately have several values (e.g. Set-Cookie, Accept), use Get HTTP header values instead.

Pins

Input pins

Pin Type Default Notes
Headers HTTP headers The headers collection to read from. Wire from a Receive HTTP `headers` output or from a Break node on an HTTP response.
Name string The header name to look up. Matched case-insensitively.

Output pins

Pin Type Notes
Value string The first value associated with the name. Empty string when the header is absent.

Example

Verify a webhook signature from a Receive HTTP trigger. Wire the Headers output of Receive HTTP into the Headers input of Get HTTP header, set Name to X-Signature, then compare the Value output to your expected signature with Equals.

See also