-get请求
GET /loginApp/success.html?username=zs&password=123456 HTTP/1.1Accept: text/html, application/xhtml+xml, */*
X-HttpWatch-RID: 89102-10094
Referer: localhost:8080/loginApp/login.html
Accept-Language: zh-Hans-CN,zh-Hans;q=0.5
User-Agent: Mozilla/5.0 (MSIE 9.0; qdesk 2.4.1266.203; Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
Accept-Encoding: gzip, deflate
Host: localhost:8080
Connection: Keep-Alive
POST /loginApp/success.html HTTP/1.1Accept: text/html, application/xhtml+xml, */*
X-HttpWatch-RID: 58116-10147
Referer: localhost:8080/loginApp/login.html
Accept-Language: zh-Hans-CN,zh-Hans;q=0.5
User-Agent: Mozilla/5.0 (MSIE 9.0; qdesk 2.4.1266.203; Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
Host: localhost:8080
Content-Length: 27
Connection: Keep-Alive
Cache-Control: no-cacheusername=zs&password=123456
GET /loginApp/success.html?username=zs&password=123456 HTTP/1.1
POST /loginApp/success.html HTTP/1.1
请求头
从第2行到空行处,都叫请求头,以键值对的形式存在,但存在一个key对应多个值的请求头.
作用:浏览器告诉服务器相关的设置.
User-Agent: Mozilla/5.0 (MSIE 9.0; qdesk 2.4.1266.203; Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
2.3请求体
HTTP/1.1 200 okAccept-Ranges: bytes
ETag: W/"158-1539331624457"
Last-Modified: Thu., 19 Sep 2019 20:39:04 GMT
Content-Type: text/html
Content-Length: 158
Date: Thu., 19 Sep 2019 20:41:46 GMT<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Title</title>
</head>
<body><h1>Login Success</h1>
</body>
</html>
HTTP/1.1 200 OK
服务器指示浏览器去做什么, 去配什么
Location: .jsp指示新的资源的位置,通常和状态,码302一起使用,完成请求重定向
Content-Type: text/html; charset=UTF-8; 设置服务器发送的内容的MIME类型,文件下载时候
Refresh: 5;url=。单位是秒
Content-Disposition: attachment; filename=a.jpg 指示客户端(浏览器)下载文件
Content-Length:80 告诉浏览器正文的长度
Server:apachetomcat 服务器的类型
Content-Encoding: gzip服务器发送的数据采用的编码类型
Set-Cookie:SS=Q0=5Lb_nQ;path=/search服务器端发送的Cookie
Cache-Control: no-cache (1.1)
Pragma: no-cache (1.0) 表示告诉客户端不要使用缓存
Connection:close/Keep-Alive
Date:Tue, 11 Jul 2000 18:23:51 GMT
本文发布于:2024-01-27 18:19:01,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/17063507421853.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |