To understand how to use fetch(), First we have to understand what it does. As per the name stands the fetch api is used to asynchronously fetch data. It provides a JavaScript interface for accessing and manipulating parts of the HTTP pipeline, such as requests and responses. It’s similar to XMLHttpRequest. But fetch api provides the fetch() method that’s easier to use for getching request asynchronously.

fetch() allows you to make network requests similar to XMLHttpRequest (XHR). …


What is HTTP?

HTTP stands for Hyper Text Transfer Protocol. So, it’s a protocol that’s used to transfer hypertext. In this context the term Hypertext means a text that contains links to other texts. It can be link of music videos or any other information too. So, we can say that:

Hypertext Transfer Protocol is the set of rules, servers and browsers used to transfer web documents back and forth.

Principles of HTTP

HTTP is a synchronous protocol, which in this case means that after a client sends a request to a server, it waits for a single response. The server can only respond to requests…

Sankalan Dasgupta

Student of Computer Science & Engineering

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store