-
HTTPBackground 2022. 2. 10. 11:29
웹상에서 자주 쓰이는 HTTP 프로토콜에 대해 정리하였습니다.
< Introduction >
The internet is made up of a bunch of resources hosted on different servers. The term “resource” corresponds to any entity on the web, including HTML files, stylesheets, images, videos, and scripts. To access content on the internet, your browser must ask these servers for the resources it wants, and then display these resources to you. This protocol(HTTP) of requests and responses enables you to view this page in your browser.
< What is HTTP / TCP? >
HTTP stands for Hypertext Transfer Protocol and is used to structure requests and responses over the internet. HTTP requires data to be transferred from one point to another over the network.
HTTP is the command language that the devices on both sides of the connection must follow in order to communicate.
The transfer of resources happens using TCP (Transmission Control Protocol). In viewing this webpage, TCP manages the channels between your browser and the server. TCP is used to manage many types of internet connections in which one computer or device wants to send something to another.HTTP :
- Command language.
- Client and Server communicate with this language.
TCP :
- Manage internet connections.
- Implements communication between a client and a server.
< Types of Requests >
There's four common http method.
- GET : retrieve an existing resource from a server
- POST : create new resources
- PUT : edit an existing resource
- DELETE : delete an existing resource
< HTTP & TCP: How it Works >
- When you type an address such as "www.codecademy.com" into your browser.
- After you type the URL into your browser, your browser will extract the http part and recognize that it is the name of the network protocol to use. Then, it takes the domain name from the URL, in this case “codecademy.com”, and asks the internet Domain Name Server to return an Internet Protocol (IP) address.
+. URL : A URL is like your home address or phone number because it describes how to reach you. - Then you are commanding it to open a TCP channel to the server that responds to that URL.
- Once the TCP connection is established, the client sends a HTTP GET request to the server to retrieve the webpage it should display.
: HTTP GET RequestGET / HTTP/1.1 Host: www.codecademy.com
- GET : http method
- HTTP/1.1 : version of HTTP
- Host: www.codecademy.com : the address of the server
: HTTP GET ResponseHTTP/1.1 200 OK Content-Type: text/html
- HTTP/1.1 : version of HTTP
- 200 OK : HTTP status code *
- Content-Type text/html (header) : shows the type of content that it will be sending to the client. - After the server has sent the response, it closes the TCP connection.
- If you open the website in your browser again, or if your browser automatically requests something from the server, a new connection is opened which follows the same process described above.
List of HTTP status codes - Wikipedia
From Wikipedia, the free encyclopedia Jump to navigation Jump to search Response codes of the Hypertext Transfer Protocol This is a list of Hypertext Transfer Protocol (HTTP) response status codes. Status codes are issued by a server in response to a clien
en.wikipedia.org
< What is HTTPS? >
Since your HTTP request can be read by anyone at certain network junctures, it might not be a good idea to deliver information such as your credit card or password using this protocol. Fortunately, many servers support HTTPS, short for HTTP Secure, which allows you to encrypt data that you send and receive.
HTTPS is important to use when passing sensitive or personal information to and from websites.'Background' 카테고리의 다른 글
HTTPS (0) 2022.03.14 Project Workflow (1) 2022.02.22 Server-Side API Calls to External APIs (0) 2022.01.10 MVC : How to Structure your App (0) 2022.01.09 SSR vs CSR (2) 2022.01.06