A brief history of HTTP

In order to better understand the advantages of the REST protocol, let us take a small detour into how the internet was used before the REST web protocol came onto the scene. The internet in 1990s was mostly used to store and share documents as marked up documents using HTTP (Hypertext Transfer Protocol). For this chapter, HTTP can be summarized as follows:

  • HTTP is a network communication protocol that starts with an HTTP request and ends with an HTTP response.
  • HTTP responses during the early periods consisted of plain text documents, but soon the HTML format gained traction as it allowed for more stylized documents.
  • Web browsers brought in a new age of internet: merely displaying text documents with different font weights wasn't enough. CSS and JavaScript came to the fore to make these documents customizable and more interactive. All these advancements led to what we now call the web.
  • One could interact with a web server using a URL and an HTTP method. There are nine HTTP methods, but, for the purpose of this book, we are only interested in five of them:
    • GET: This is used when sending simple HTTP requests
    • POST : This is used when we want to include valuable information while sending HTTP requests
    •  PUT, PATCH, and DELETE: Technically, they are identical to, POST method, although they differ in functionally

We shall revisit these HTTP methods in the next section and explore them in greater detail.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.148.210