current position:Home>Understand the basic history and knowledge of HTTP
Understand the basic history and knowledge of HTTP
2022-04-29 12:16:48【InfoQ】
1990 Years ago
Before the 1990s , The Internet has not been invented yet , At that time, the Internet basically sent e-mail (Email1965 The invention of ) And other forms are simple and practical
1990 Years later, the world
- Tim Berners-Lee( Hereinafter referred to as Sir Lee ) stay 1989 - 1992 Year , Invented WWW(World Wide Web)
- It mainly includes three concepts
- URI, Commonly known as the website
- HTTP, A protocol for transferring content between two computers
- HTML, Hypertext , Mainly used to do page Jump
- URL The function of is to let you visit a page ,HTTP The function of is to let you download this page ,HTML The function of is to let you understand this page
- Perfect match, not tired to work
- In addition to inventing these concepts , also :
- Invented the first server
- Invented the first browser
- Wrote the first web page
- He won the most prestigious award in the field of computer science —— Turing Award
- The father of the World Wide Web Tim Berners-Lee Turing award : Bonus 100 Thousands of dollars ( Click to view the award information )
URI(Uniform Resource Identifier)
Is a string used to identify the name of an Internet resource URI It is divided into URL and URN, We usually use URL As web address
- URN( Uniform resource code )
- ISBN: 9787115275790 It's just one. URN, adopt URN You can be sure of one 「 Unique 」 resources ,ISBN: 9787115275790 The corresponding resource is 《JavaScript Advanced programming ( The third edition )》 This book . You're going to introduce any library 、 The bookstore , They all know it's this book .
- URL( Uniform resource locator )
- adopt URL You can be sure of one 【 Unique 】 Address ( website )

First level domain name com Two level domain name baidu Three level domain name www

www.baidu.com
DNS
- Enter the domain name
- Output IP
Server + Client + HTTP
The browser is responsible for initiating the request, and the server is in 80 The port receiving request server is responsible for returning the content ( Respond to ) The browser is responsible for downloading the response content HTTP The role of is to guide the browser (Clinet) And the server (Server) How to communicate
Request example
1.url -s -v -H "Frank: xxx" -- "https://www.baidu.com" The requested content is
GET / HTTP/1.1
Host: www.baidu.com
User-Agent: curl/7.54.0
Accept: */*
Frank: xxx
-
curl -X POST -s -v -H "Frank: xxx" -- "https://www.baidu.com" The requested content is
POST / HTTP/1.1
Host: www.baidu.com
User-Agent: curl/7.54.0
Accept: */*
Frank: xxx
Format of request
1 Verb route agreement / edition
2 Key1: value1
2 Key2: value2
2 Key3: value3
2 Content-Type: application/x-www-form-urlencoded
2 Host: www.baidu.com
2 User-Agent: curl/7.54.0
3
4 Data to upload
The request consists of at most four parts , There are at least three parts .( That is to say, the fourth part can be empty ) The third part is always a carriage return (\n) Verb has GET POST PUT PATCH DELETE HEAD OPTIONS The path here includes 「 Query parameters 」, But does not include 「 Anchor point 」( The anchor point is viewed by the browser , The server doesn't see ) If you don't write the path , So the default path is / The first 2 In section Content-Type Marked the 4 Part of the format
use Chrome Send the request
open Network Enter the web address in the address bar Network Click on , see request, Click on 「view source」 Click on 「view source」 Click on 「view source」 Click on 「view source」 Finally ordered ? You can see the first three parts of the request. If there is a fourth part of the request , So in FormData or Payload You can see it in it
Respond to
Format of response
1 agreement / Version number Status code State interpretation
2 Key1: value1
2 Key2: value2
2 Content-Length: 17931
2 Content-Type: text/html
3
4 What to download
The status code should be memorized , It's what the server says to the browser
1xx Not commonly used
2xx It means success
3xx Go away
4xx It means you are wrong
5xx Say ok , I was wrong
Status code query

use Chrome View the response
open Network Enter the URL and select the first response to view Response Headers, Click on 「view source」, Click on 「view source」, Click on 「view source」 You will see the first two parts of the response Response perhaps Preview, You'll see the response number 4 part
Last
If you think this article is useful to you , Please give our open source project a little bit star:
http://github.crmeb.net/u/defu
Thank you for !
Get the source code address for free :
http://www.crmeb.com
PHP Learning manual :
https://doc.crmeb.com
Technical exchange forum :
https://q.crmeb.com
copyright notice
author[InfoQ],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/119/202204291046289076.html
The sidebar is recommended
- JavaScript functions -- pre parsing, Iife, advanced functions, recursion
- JavaScript object
- How to introduce element plus gracefully in vue3 project on demand
- Component slot Vue js
- How to write game interface style in HTML
- Ask some front-end questions.
- Information | driverless taxi has come to Beijing. Xiaoma Zhixing has been approved to carry out automatic driving service in Beijing
- [taro react] - H5 route configuration cancels # on the route
- Reverse advanced, using ast technology to restore JavaScript obfuscated code
- JavaScript object
guess what you like
Vue introduces vant / elementul
JavaScript queue“
Vue content summary
vue3. 0
Small tips: detection of JS font loading failure or completion
CSS is a box that has been climbing
Leetcode215 - the kth largest element in the array - quick sort - quick select - template
CSS adds effect to the four corners of div
HTTP error 500.19 internal server error occurred in the integration pageoffice of aspnetcore project,
Front end < TD > what is the word limit of the label
Random recommended
- Construction and development of automatic test platform based on HTTP runner
- Application of RT thread - use RT thread on stm32l051 (v. conclusion of wireless temperature and humidity sensor)
- Expose Dubbo to HTTP service
- Put the front end into the spring cloud project
- Front end learning day 4 - CSS
- Vue URL jump page with parameters
- JavaScript Chapter 13 traversal of arrays and implicit parameters of function methods
- These CSS efficiency improvement skills, you need to know!
- Beijing has opened the pilot of unmanned operation of passenger cars, and the driverless air outlet has arrived
- Test theory series - Test Case elements and design methods Part II
- How to make the peak value of measured output voltage not less than 2V
- Hexo quickly set up its own blog
- Gee synthetic cloudless landsat-8 and sentry-2 data
- Prototype object creation method case JavaScript specific implementation steps
- YAF CLI and HTTP access modes
- Simple HTML + CSS animation web page production DW simple animation web page production
- The correct way for web programmers to make a pink girl series happy birthday blessing web page (HTML + CSS + JS)
- HTML + CSS + JS to make simple animation web pages
- HTML gourmet web page production DW static web page production div + CSS gourmet web page implementation and production
- Programmer 520 Tanabata Valentine's Day confession code HTML + JS + CSS petal photo album web page template programmer confession necessary
- Element notify notification prompt text wrap
- Belkin: it's too early to talk about real wireless space charging
- JavaScript ES6 set (set) type* ω *
- Understand JavaScript function execution process and scope chain
- Java project: nursing home management system (java + springboot + thymeleaf + HTML + JS + MySQL)
- Java project: drug management system (java + springboot + HTML + layui + bootstrap + seals + MySQL)
- An error is reported when installing hexo during hexo deployment. What is the reason and how to solve it (tag git | keyword path)
- [front end basics] Linux command: Project Automation deployment
- Less than 100 or win Porsche, Maserati "special supply" 3.0T technical analysis
- Introduction to basic methods of math built-in objects in JavaScript
- CSS matches the nth element of the parent element
- What is the commercialization process of unmanned robotaxi after China allows driverless steering wheel?
- A lot of trouble, cook also worried: a quarter less than $8 billion
- Ajax realizes no refresh paging (no refresh paging shopping cart source code)
- [flutter topic] 101 what is flutter elements Yyds dry goods inventory
- What is the commercialization process of unmanned robotaxi after China allows driverless steering wheel?
- A lot of trouble, cook also worried: a quarter less than $8 billion
- Element acquisition of data structure c language sequence stack
- Set video label based on Vue
- CSS realizes div width adaptation, and the proportion of height and width is fixed