Make sure we use tab size 2 and indent all our code from now on. This will help tremendously in HTML where things can get quite messy fast. Why use tabs? Use Tabs. Not Spaces
The Internet is the backbone of the Web, the technical infrastructure that makes the Web possible. At its most basic, the Internet is a large network of computers which communicate all together. (Source: Mozilla)
In simple terms:
A connection between two computers. One sends requests, the other responds. And vice versa.
HTTP(Hypertext Transfer Protocol) is a protocol that allows the transfer of data between a client(browser) and a server. The client requests data and the server answers with a response.
This transfer of data happens through TCP(Transmission Control Protocol)
When you type in www.google.com in your browser, a Domain Name Server (DNS) translates www.google.com to an IP address. Try nslookup www.google.com
in the terminal. Then, a TCP connection is opened, and a HTTP 'GET' request is made to the server to retrive the page.
After the server has sent back the response, the TCP connection is closed.
GET is used to request data (retrieving)
The URL contains all the necessary information the server needs to locate the resource
POST is used to send data to a server
POST requests carry a payload that specifies the data sent to the server
PUT is used to update data
PUT requests carry a payload that contains updated data
DELETE is used to delete data
1xx: Information
2xx: Successful (200 OK)
3xx: Redirect
4xx: Client Error (404 Not Found)
5xx: Server Error
Install Postman
-
Make a GET request to postman-echo.com/get
-
Make a GET request to postman-echo.com/get?foo1=bar1&foo2=bar2
-
Make a POST request to postman-echo.com/post by testing out different query params