Hey, everyone, and welcome back to the Knowledge Portal Video series.
Now, we had a high level overview about various type of request methods which a client can send to
a web server.
Now, in response to that request, methods, a web server might send a certain Http status code like
success or not found or some kind of error as well.
So these are called as the Http status codes, and we'll have a high level overview about the Http status
codes as well.
Now, as we already discussed, a client sends a request to the web server asking for get documented
or MP4, and the web server sends a response back.
Now, depending upon the response which a web server formulates for this specific request as a Http
response code is basically generated.
So this this specific code you see 200.
Okay is called as the status code.
Now, it might happen.
Let's say, for example, a client send a request, get documentary dot mp4 and there is no such file
called as documentary dot mp4 in the web server.
Now, in that case, web server cannot send a 200, okay?
Because there is no such file itself.
So that is one possibility.
Second possibility is present like the documentary dot MP4 is present, but the client does not have
a permission to view this file or fetch this file.
So that is the second possibility.
So there can be lot of such possibilities which might be available.
Or third possibility is like client sends a delete call or delete request method on documentary dot
mp4 and the web server might not accept the request.
So depending upon the situation, the response of the web server might be different and corresponding
to each response.
The status code which will be sent will be different.
200 okay.
Basically means successfully processed.
You can have a 404 or 400 and 3 or 401.
ET cetera.
So this specific aspect is called as the status code.
And you need to remember high level overview about various status codes which are available in the Http
protocol.
Now, there are various response status codes which are available.
One is the 100 series.
So these are the 100 series which are called as the Informational status code.
You have the 200 series which are generally indicated as a success status.
Code 300 series are called as the redirection status.
Code 400 series are something related to some error from the client side and 500 series relates to some
error from the server side.
So let's have a high level overview.
So 200 status codes indicates that the action is received and.
Is successfully understood, accepted and processed.
So whatever action which has been received by the server from the client is successfully understood,
accepted and processed.
So this is what I call as the.
200 status code.
Now, some of the example is 200.
Okay.
206 partial content.
So these are the very famous response status code.
Now, there are a lot of others as well, but we will not be going too much in depth right now.
Whenever a need arises.
In a practical session, we'll be discussing more about 200 series status code.
Now, 300 status codes indicates that client must take additional steps to complete the request.
So whatever request that the client has sent, that request is not good enough to have a successful
response.
So there are some additional steps which a client must take, and these additional steps can be informed
by the web server so web server can tell a client that you should be doing these additional steps to
complete a request.
Now, one of the famous 300 series status codes are generally part of the URL redirection, and some
of them is 301, which basically indicates that the page is moved permanently and 304, which is called
as not modified, which is generally used in the caching mechanisms.
We'll be discussing in detail about these status codes in the relevant practical session that will be
having 400 series status codes indicates that a client seemed to have sent some requests, which is
an not an idle one or an error sum.
So one of the very famous that you might have seen is 404 page not found, which looks something similar
to this.
You also have a 403 forbidden, which basically means client does not really have a permission to view
this page.
Now in case if there is some kind of a Http authentication like basic authentication or digest authentication,
you have a 401.
Which basically will ask client for a username and password before the contents are being viewed by
the client.
Last but not the least, you have the 500 series status code, which basically indicates that there
is some issue on the server side and it has failed to fulfill the request.
Now there can be a possibility that there are some issues on the web server side also, and those issues
are indicated by the 500 series status code.
So one of the famous ones is internal server error.
I'm sure you are aware about that.
You might have seen internal server error a lot of time.
So that is one of the example.
You have 504 gateway time out like client might be expecting or there might be a timeout of 20s in which
the server is not able to respond.
So you have a 504 gateway timeout.
You also have 503 service unavailable.
So these are a high level overview about the Http status codes.
I hope you understood the basic about status code.
Now we'll be discussing in detail whenever a right session comes related to each of the status codes.
I hope this has been informative for you and if you have any doubts, suggestions, questions, feel
free to connect us at Twitter, Facebook or LinkedIn or email us at instructors at KP Labs.
Thanks for watching.