Hi, I’m working on an app based on my research here. Some of the workflow here is behind the scenes and I need to understand that flow.
How do the headers get sent out? Do I create one larger message with the headers and request as one big block of text? Or, do the headers get send as separate blocks?
Works great in Postman but I’m working outside of Postman on this request.
Hey @djquecke Welcome to the community!
I’m guessing you are trying to understand how the HTTP protocol works? For that I would suggest checking out this good resource to get you started: An overview of HTTP - HTTP | MDN
In short, HTTP is a text-based protocol, and every HTTP request will contain headers as part of the request, along with any data-payload where applicable.
For HTTP methods that can accept body-payload (POST etc) headers and the payload are separated by a single blank line (more specifically
\r\n). So to answer your question, headers + data are sent together.
Example POST request:
POST /post HTTP/1.1
In Postman you actually check the exact HTTP request being sent via the Postman Console’s:
- Send a request within Postman
- Click the
Console icon at the bottom left
- Expand the request you want to view, by clicking on it
- On the right hand side you should see the
Show raw log link
- Clicking on
Show raw log will give the exact raw HTTP message being sent to the server, as well as the raw response received back.
If you want to get a deeper understanding of HTTP protocol, have a look at the HTTP RFC.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.