Take Shape:// HTTP Requests and Responses
By: James Ardery
Tags: Https, Ajax, Http Request, Http2, Json

The HTTP Request <body> can include many different pieces of data but one of the more common would be the form field information a user sends out when logging into their favorite website.

An HTTP Response <header> will include information about the server sending the response (Apache or EngineX) this information often is hidden for security reasons. Response headers will also include set set cookie, date, and a content type such as HTML, CSS, jpg, or png.

An HTTP Response <body> will include the initial HTML document that will build a given web page on initialization as well future requests which would be any data a user would be asking for from the server (all the profile pictures).

HTTP headers consist of many different methods but the ones we are all most familiar with are GET, POST, PUT/PATCH, DELETE. Which complete our CRUD functionality.

Requests and responses happen often, use many different methods, and contain many different types of data. All of that traffic is documented in HTTP status codes. The dreaded 404 code is the one most familiar because it lets a user know when the endpoint or file they are looking for is not found. The most common code would be a 200 which is a successful request and response status. See them with dogs here or cats here.

While HTTP was developed around 1989 and is literally as old as the world wide web, it was officially standardized in 1997 and has only has seen one update which came in 2015 with HTTP 2. HTTP 2 is a faster and more secure version of HTTP. It is supported by all of the major browsers but in a survey conducted by W3TechSchools that as of March 2021 only 50% of the top 10 million websites support and implement HTTP 2. The updates in HTTP 2 have increased efficiency/speed and decreased latency through the use of request and response compression, prioritization, and multiplexing.

Combining script and CSS calls decreasing load time and server requests

In addition to the release of HTTP 2 there has been a massive push across the globe to implement and standardize HTTPS for all requests and responses. HTTPS used to only be relegated to tasks such as e-commerce and authorization but with the increase in cookie caching and hacking activity privacy has become a major focal point in the tech community. The push for standardizing HTTPS recognizes the fact that any transfer of data across the world wide web is inherently insecure unless the channel which data is being transmitted through is secured via encryption. The process of encrypting these channels involves Transport Layer Security(TLS) formerly known as Secure Socket Layers(SSL).

Encryption and the intricacies of HTTPS are fascinating but would require another blog post but you can read more here and here. Hopefully this gives you a better understanding of the HTTP Request and Response cycle.

Resources:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview

https://hackr.io/blog/json-vs-xml#:~:text=JSON%20is%20said%20to%20be,completely%20agree%20with%20this%20though!

https://en.wikipedia.org/wiki/HTTP/2#:~:text=5%20supports%20HTTP%2F2%2C%20released,9%20on%20February%2020%2C%202018.

https://en.wikipedia.org/wiki/HTTP/2#:~:text=5%20supports%20HTTP%2F2%2C%20released,9%20on%20February%2020%2C%202018.