标签:8080 请求 application html HTTP Fetch localhost
*概念:Hyper Text Transfer Protocol 超文本传输协议
*传输协议:定义了客户端和服务器通信时,发送数据的格式
*特点:
1.基于TCP/IP的高级协议
2.默认端口号:80
3.基于请求/响应模型的的:一次请求对应一次响应
4.无状态的:每次请求之间相互独立,不能相互交互
*历史版本
1.0:每次请求响应都会建立新的链接
1.1:复用链接
*请求消息的数据格式:
-
请求 URL:
http://localhost:8080/demo1_war_exploded/aaa.html
-
请求方法:
POST
-
状态代码:
200
-
远程地址:
[::1]:8080
-
引用者策略:
strict-origin-when-cross-origin
-
响应头查看源
-
Accept-Ranges:
bytes
-
Connection:
keep-alive
-
Content-Length:
236
-
Content-Type:
text/html
-
Date:
Fri, 06 Jan 2023 16:44:32 GMT
-
ETag:
W/"236-1673023275087"
-
Keep-Alive:
timeout=20
-
Last-Modified:
Fri, 06 Jan 2023 16:41:15 GMT
-
请求标头查看源
-
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
-
Accept-Encoding:
gzip, deflate, br
-
Accept-Language:
zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6
-
Cache-Control:
max-age=0
-
Connection:
keep-alive
-
Content-Length:
11
-
Content-Type:
application/x-www-form-urlencoded
-
Cookie:
JSESSIONID=31C72F1D9809162C7162A4AD8844F3E6; Idea-2a398c=5a481628-2bad-4c5f-9124-e78b51143638
-
Host:
localhost:8080
-
Origin:
http://localhost:8080
-
Referer:
http://localhost:8080/demo1_war_exploded/aaa.html
-
sec-ch-ua:
"Not?A_Brand";v="8", "Chromium";v="108", "Microsoft Edge";v="108"
-
sec-ch-ua-mobile:
?0
-
sec-ch-ua-platform:
"Windows"
-
Sec-Fetch-Dest:
document
-
Sec-Fetch-Mode:
navigate
-
Sec-Fetch-Site:
same-origin
-
Sec-Fetch-User:
?1
-
Upgrade-Insecure-Requests:
1
-
User-Agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.54
1.请求行
GET:
1. 请求参数在请求行中,在url后
2.请求的url长度有限制
3.不太安全
POST:
1.请求参数在请求体中
2.请求的url长度没有限制的
3.相对安全
2.请求头
*常见的请求头:
user-Agent:浏览器告诉服务器,我访问你使用的浏览器版本信息
*可以在服务器端获取该头的信息,解决浏览器的兼容性问题
2.referer:http://localhost/login.html
*告诉服务器,当前请求从哪里来
*作用:1.防盗链 2.统计工作
3.请求空行
4.请求体
标签:8080,
请求,
application,
html,
HTTP,
Fetch,
localhost
From: https://www.cnblogs.com/lin513/p/17032020.html