http协议——简要介绍说明

1.HTTP英文全称

HTTP(hypertext transport protocol):超文本传输协议,该协议详细规定了浏览器和万维网之间互相通信的规则与格式。

2.客服端向服务器发送请求格式

  1. 行:POST/GET HTTP/1.1

  2. 头:
    HOST:xxxx
    Cookie:xxxx
    Content-type:xxxx

  3. 空行

  4. 体: ?xxxx=xxxx&xxxx=xxxx

3.服务器根据请求返回的相应格式

  1. 行 HTTP/1.1 200 OK

  2. Content-type:text/html;charset=utf-8
    Content-length:2048
    Content-encoding:gzip
  3. 空行
<html>
	<body>
		<h1>博客笔记</h1>
	</body>
</html>

猜你喜欢

转载自blog.csdn.net/qq_45895576/article/details/114171941