Skip to content

Instantly share code, notes, and snippets.

@DeepNeuralAI
Last active June 1, 2019 02:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DeepNeuralAI/c1cb1974cc59e9fe758dd5cc96f35712 to your computer and use it in GitHub Desktop.
Save DeepNeuralAI/c1cb1974cc59e9fe758dd5cc96f35712 to your computer and use it in GitHub Desktop.
Overview of Internet

How the Internet Works (Sort of)

Before We Start

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.

Read This

How the Web Works

Watch These

What is the internet?

HTTP and HTML

Play around with this

Submarine Cables

Overview of HTTP

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.

Type of Responses

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

Status Codes

1xx: Information
2xx: Successful (200 OK)
3xx: Redirect 
4xx: Client Error (404 Not Found)
5xx: Server Error

Short and Sweet

Install Postman

  1. Make a GET request to postman-echo.com/get

  2. Make a GET request to postman-echo.com/get?foo1=bar1&foo2=bar2

  3. Make a POST request to postman-echo.com/post by testing out different query params

ARPANET

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment