that the language, this one is saying that the accepted language is English.
The headers can be any application-specific string, but
they are a core set that was defined by the IETF that are commonly used.
An HTTP message header must be separated from the message body by a blank line.
So after the header, blank line, and then here comes the third part, the body.
So the message body is optional.
Doesn't have to appear in a request.
It's typically included if there's user-entered data that needs to be
uploaded to the server side.
If an HTTP request includes a body,
there are usually header fields that describe what is up in the body.
So, for example, you might see something like Content-Type
is text/html or the Content-Length is 3495 bytes.
So these things are describing the body itself.
So these are the three parts of the request,
the request line, the header, and then the message body.
To make this a little bit more concrete, let me pull up a website.
So here's The New York Times, and I'm going to use Chrome in this case,
and I'm going to select > View > Developer > Developer Tools.
So, again, all of the browsers have these.
So, here's the Developer Tools and I'm going to go ahead and hit reload,
so you can see the request that is made here.
And so here it is.
Let's select Network and then I can look at the requests, and a lot of stuff
happened here but the initial request was www.newyorktimes.com and
you'll see that it was a get request, it returned status 200.
We're going to talk about that in the next video, but
let's take a look at this request itself.
And I'm going to select the headers here.
And I want to see the actual request since that's what we're talking about.
I'm going to select View Source and if you look at this,
you'll see that it was a GET request and it used HTTP/1.1.
And here you see the headers.
So there's host, so the field name, and then the value,
Connection: keep-alive, Cache-Control, maximum age.
Accept: text, so this is saying what the browser can accept, so on and so forth.
So, everything here are headers.
There's no body to this and at the very end, you'll see a big, massive cookie.
So again, provide as a header.
So the header field and then the actual value is specified here.
So this is a GET request.
Let's go to our blog application and let's enter a new post.
And so I'm going to create a new post and
again I'm going to turn on the Developer Tools, so that we can see what happens.
And so we'll create a new post and let's just call it Test and Test.
We're going to create that post and let me look here, and
we'll see that this post is actually using the post method.
Again we can take a look at this and we can see that the Request Header
was of type POST and it used the route called POST.
This is what was added to the end of the URL here, then it was using HTTP/1.1.
You'll see in this case that the Header Field and down below there's
actually a body associated with this as well and it's in this Form Data.
So the form data contains the body.