Instructor: So how does REST API request looks like?
Well, the request usually has the following components.
First, the method,
which is actually an HTTP verb.
It could be GET or POST, PUT, DELETE.
Now, note that each verb has a very specific role
that we'll discuss later.
After the method, there is a URL.
The URL is the location of the resource,
and sometimes also, parameters.
Then the headers,
which contain metadata of the request,
such as user agent authorization and some more metadata.
And at last, the body,
which is the contents of the request.
Now, as we will see later, the body is an optional.
Not all REST API requests contain body.
So here is an example of a typical REST API request.
And let's see the various components,
how they map to these requests.
So the method is right here.
That's the word GET,
which is a standard and quite common HTTP verb.
Next is a URL.
You can see it looks like a typical URL,
with the forward slashes and all.
And then, the headers.
Now, as we said before,
headers contain metadata about the request.
So you can see here is a user agent,
which represent the applications that made the request.
You can see something about cache.
You can see the host that the client accessed
and some more metadata.
So this is a typical REST API request.