What is HTTP(s)

HTTP: HyperText Transfer Protocol

HTTPs: HyperText Transfer Protocol Secure

-------------------------------------------------------

http is what s used whenever we view a website, developed by Tim Berners-Lee and his team between 1989-1991


Http is the set of rules used to communicating with web servers for the transmitting webpage data, could be html images videos .... 


https is the secure version of http. 


The data is encrypted to prevent sniffing attacks on the http connection. 


It also gives us assurances that we are talking to the correct web server and not something impersonating it. ( dns poisoning attack ) 

-----------------------------------------------------------------------------------------------------------------------------

                                                            HTTP Methods

-----------------------------------------------------------------------------------------------------------------------------

Hypertext Transfer Protocol (HTTP) is the protocol that specifies how a web browser and a web server communicate.

HTTP methods are a way for the client to show their intended action when making an HTTP request. 

There are a lot of HTTP methods.

The common ones and most dealt with are GET and POST methods.

-----------------------------------------------------------------------------------------------------------------------------

GET Request

This is used for getting information from a web server.

POST Request 

This is used for submitting data to the web server and potentially creating new records 

PUT Request 

This is used for submitting data to a web server to update information 

DELETE Request 

This is used for deleting information/records from a web server

-----------------------------------------------------------------------------------------------------------------------------

                                                    HTTP Status Codes

-----------------------------------------------------------------------------------------------------------------------------


100-199 - Information Response

There are sent to tell the client: the first part of their request has been accepted and they should continue sending the rest of their request 

These codes are no longer very common. 

--------------------------------------------------

200-299 - Success

This range of status codes is used to tell the client their request was successful. 

--------------------------------------------------

300-399 - Redirection

These are used to redirect the client's request to another resource. 

This can be either to a different webpage or a different website altogether.

--------------------------------------------------

400-499 - Client Errors

Used to inform the client that there was an error with their request. 

--------------------------------------------------

500-599 - Server Errors

This is reserved for errors happening on the server-side and usually indicate quite a major problem with the server handling the request.

-----------------------------------------------------------------------------------------------------------------------------

Since there are a lot of different http status codes. 

Without including the fact that applications can even define their own status codes. 

These are the most common HTTP responses codes that the majority of the end users came across it.

* 200 - OK : The request was completed successfully.

* 201 - Created: A resources has been created.

* 301 - Permanent Redirect: This redirects the client's browser to a new webpage or tells the search engines that the page has moved somewhere ele and to look there instead.

* 302 - Temporary Redirect: Similar to permanent redirect, but as the name suggests, this is only a temporary change and it may change again in the near future. 

* 400 - Bad Request: This tells the browser that something was either wrong or missing in their request. 

This could sometimes be used if the web server resource that is being requested expected a certain parameter that the client didn't send. 

* 401 - Not Authorised: You are not currently allowed to view this resource until you have authorised with the web application, most commonly with a username and password 

* 403 - Forbidden: You do not have permission to view this resource whether you are logged in or not.

* 404 - Page Not Found: The page/resource you requested does not exist.

* 405 - Method Not Allowed: The resource does not allow this method request. 

For example: you send a GET request to the resource /create-account when it was expecting a POST request instead.

500 - Internal Service Error: The server has encountered some kind of error with your request that it does not know how to handle properly. 

503 - Service unavailable : This server cannot handle your request as it is either overloaded or down for maintenance.
-------------------------------------------------------
For more details on this topics, you can check the references below! 

-----------------------------------------------------------------------------------------------------------------------------
Thank you for reading! 🙂

Roger

Comments

Popular posts from this blog

Common Network Commands: Ping

Common Network Commands: Route

John The Ripper