- https://www.baidu.com/s?wd=‘query-string’
- scheme://host:prot/搜索接口?搜索参数=‘query-string’
- scheme:协议:http、https、ftp
- host:域名或ip地址
- port:端口
- path:资源路径
- query-string:发送的参数 : https://www.baidu.com/s?wd=‘参数’
get请求报文
// 请求行 GET http://test.lemonban.com/ningmengban/app/login/login.html HTTP/1.1 // 请求头部 Host: test.lemonban.com Connection: keep-alive Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3 Accept-Encoding: gzip, deflate //浏览器接收gzip压缩 Accept-Language: zh-CN,zh;q=0.9 //浏览器接收语言 // 空一行 空一行 //请求体 空一行 // 注意:get请求没有请求体,post、put请求有请求体
get响应报文
HTTP/1.1 200 OK Server: nginx/1.12.0 Date: Tue, 24 Mar 2020 10:36:02 GMT Content-Type: text/html;charset=UTF-8 Content-Length: 5431 Connection: keep-alive Accept-Ranges: bytes ETag: W/“5431-1560931664000” Last-Modified: Wed, 19 Jun 2019 08:07:44 GMT href=“…/…/css/framework/validationEngine.jquery.css” /> style=“padding-bottom: 20px; display: flex; justify-content: center; align-items: center;”>
欢迎回来
还没有帐号?立即注册
enctype=“application/x-www-form-urlencoded”> <input type=“text” name=“username” id=“username” class=“ipt ipt-email validate[required]” data-validate=“phones” placeholder=“请输入登录手机号” /> <input type=“password” name=“password” id=“password” class=“ipt ipt-pwd validate[required]” placeholder=“请输入登录密码” /> <input type=“checkbox” name=“cookietime” value=“2592000” id=“cookietime” /> 记住我 忘记密码?点击找回 <input type=“button” name=“dosubmit” id=“login-button” data-fromurl=“space/index” value=“登录” class="btn btn-blue login-submit btn-block " />