- 11 May 2021
- 1 Minute to read
- Print
- DarkLight
Accessing HTTP Headers via Flow
- Updated on 11 May 2021
- 1 Minute to read
- Print
- DarkLight
Overview
Due to the possibility that some REST calls may not contain Body content, and some integrations may require information not found in the Body, oftentimes a user may need to obtain Header data. Headers contain certain things that pertain to a REST service such as Authorization or Authentication information, the type of REST method (such as GET, POST, PATCH, etc..), and custom application-specific header information.
To aid in obtaining this information, users may utilize a workflow to obtain HTTP Headers.
The following example below demonstrates how to achieve this via Flow in Decisions.
Example
- From a Designer Folder, select CREATE FLOW and CREATE a new Flow.
- From the Flow Designer, connect the Start step to the End step.
- Select the End step to navigate to its Properties tab; then, under Data > Output click SHOW EDITOR.
- From the Output Data Designer, select DataPair from the Type dropdown, check the Is List box, and provide a Name. Then click CLOSE.
In the Flow Designer from the End step's Properties, Select From Flow map Flow Data.RequestHeaders.All Items as Array to Inputs > [INPUT NAME].
From the top Action bar, click Integration. From the View Integration Details page, define the Service via the parameters under Setup, then click SHOW SERVICE API.
Copy the Call via GET URL. Then, open Postman.
From Postman, create a new GET call and paste in the URL. If required, establish any parameters via the Params tab. Then click Send.
Navigate to the Headers tab and view the Body return.
Output ResultsThe Body return will Output the HTTP Headers for the GET Integration.