What is an HTTP Header?
An HTTP header is a container of information that can be found both in HTTP requests and responses. It should be placed right before the body of the content, and in it, we can usually find:
- Message body information → Content-Type (e.g. JSON, XML, etc.);
- Authentication → Authorization (e.g. Bearer, Basic, API-Key, etc.);
- Connection management → Keep-Alive(checks how long the connection should stay open before going in timeout)
Depending on the specific server that is going to receive this request, some of these fields could be mandatory, while others are not. For instance, some servers need an authorization header for every request that is submitted to them.
If you look at the HTTP request as a package that is going to be shipped, the body could be represented by the package content(e.g. the pair of headphones I bought from Amazon), while the header could be represented by a series of labels that have been sticked on top of it (e.g. one of them could contain the address the package has been shipped to).
How do I add a header to my HTTP Request integration settings?
Add a string that starts with HEADER in the Headers or Body field, depending on the bridge configuration, regardless of which Content-Type the body is using (e.g., JSON, XML, etc.). After this, add a space and the header you need to use (e.g. Authorization).
EXAMPLE 1
Example of text to write in the Body field, from the bridge configuration using application/x-www-form-urlencoded as a Content-Type:
HEADER Authorization: Basic cG9yY29kaW86bGFtYWRvbm5h firstname: @@FirstName@@ lastname: @@LastName@@ email: @@Email@@ phone: @@PhoneNumber@@ street: @@Address@@ subscribed: y
EXAMPLE 2
Example of text to write in the Body field from the bridge configuration using application/json as a Content-Type:
Related Articles
- Webhook integration: Common questions
- Webhook - How to connect integrations as a Source via Webhook URL?
- How to integrate with Unbounce as a source?
- Step-by-step guide on how to create a Bridge
- HTTP_Request_Header.jpg40 KB
- Header_HTTP.jpg90 KB
Comments
0 comments
Please sign in to leave a comment.