DATA FETCHING

HTTP Request

After we established a secure connection with the server, the browser will send an initial HTTP GET request. First, the browser will request the markup (HTML) document for the page. It will do this using the HTTP protocol.

HTTP (Hypertext Transfer Protocol) is a protocol for fetching resources such as HTML documents. It is the foundation of any data exchange on the Web and it is a client-server protocol, which means requests are initiated by the recipient, usually the Web browser.

The method – e.g: POST, GET, PUT, PATCH, DELETE etc.
URI – stands for Uniform Resource Identifier. URIs and used to identify abstract or physical resources on the Internet, resources like websites or email addresses. An URI can have up to 5 parts:

  • scheme: used to say what protocol is being used
  • authority: used to identify the domain
  • path: used to show the exact path to the resource
  • query: used to represent a request action
  • fragment: used to refer to a part of a resource
 
 
// URI parts
Scheme: // authority path? Query # fragment
 
//URI example
https://example.com/users/user?name=Alice#address
 
https: // scheme name
example.com // authority
Users/user // path
Name=Alice // query
Address // fragment
 
 

HTTP header fields – are a list of strings sent and received by both browser and server on every HTTP request and response (they are usually invisible for the end-user). In the case of requests, they contain more information about the resource to be fetched or about the browser requesting the resource. (Source: From DEV community)

You cannot copy content of this page