/** * HTTP协议 */网络通讯的规范之一,不同计算机之间的通讯规范/** * 抓包工具Fillder * ///安装Fiddlerhttps://www.telerik.com/docs/default-source/fiddler/fiddlersetup.exe?sfvrsn=4cmd ipconfig 记录ipv4地址:192.168.1.105//配置手机证书ToolsFiddler OptionsHTTPs勾选Decrypt HTTPs traffic勾选Ignore server certificate errorsTools Fiddler OptionsConnections选项卡port 8888勾选Allow romote computers to connectOK重启Fiddler软件//配置手机打开android设备设置先正常连接网络打开 http://192.168.1.105:8888下载FiddlerRoot certificate文件名输入:FiddlerRoot.cerWiFi长按,选择“修改网络”勾选“显示高级选项”“代理”后面的输入框选择“手动”“代理服务器主机名”后面输入ipv4地址“代理服务器端口”后面输入8888保存/** * 请求Requset */请求首行: 请求方式 请求地址 请求协议请求头: 键值对 Connection(连接方式): Keep-Alive保持; close连完就断请求空行: 分割的作用请求正文: 数据/** * GET请求 *//*请求首行*/GET http://api.easou.com/api/bookapp/promotionInfo.m?session_id=&cid=eef_easou_book&version=002&os=android&udid=6E5B7509E5560BE9F5CB0FA2544F5CFE&appverion=1038&ch=blf1298_14225_001&session_id=&statId=HOqbHMcCuvzkTi5QVRa6qQIlcubbk HTTP/1.1/*请求头*/Host: api.easou.comConnection: Keep-AliveUser-Agent: esbook android 3.1.0Accept-Encoding: gzip,esenc/*请求空行*//*请求正文*//** * POST请求 *//*请求首行*/POST http://adm.easou.com/splashad HTTP/1.1/*请求头*/Host: adm.easou.comConnection: closeUser-Agent: Mozilla/5.0 (Linux; Android 5.1.1; SM-N9100 Build/LMY47X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/43.0.2357.121 Mobile Safari/537.36Accept-Encoding: gzipAccept: text/html;q=0.9,*/*;q=0.8Accept-Charset: utf-8;q=0.7,*;q=0.3Content-Length: 276Content-Type: application/x-www-form-urlencoded; charset=UTF-8/*请求空行*//*请求正文*/sdk=essdk&cngo=2&nett=3&mid=355848069184185&sim=89860116817013590566&u_h=2560&muid=5899&mac=98%3AF1%3A70%3A56%3AB6%3A24&dl=19&cid=&ct=1&u_w=1440&os=1&innercid=general&av=3.1.0&an=%E5%AE%9C%E6%90%9C%E5%B0%8F%E8%AF%B4&u_ds=4.0&ua=samsung__SM-N9100__5.1.1&mmid=2418&ver=4.3.0%3A&/** * 响应Response */响应首行响应头响应空行响应正文/*响应首行*/HTTP/1.1 502 Fiddler - Connection Failed/*响应头*/Date: Thu, 27 Apr 2017 23:13:17 GMTContent-Type: text/html; charset=UTF-8Connection: closeCache-Control: no-cache, must-revalidateTimestamp: 07:13:17.603/*响应空行*//*响应正文*/[Fiddler] The connection to '74.125.204.113' failed. Error: TimedOut (0x274c). System.Net.Sockets.SocketException 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 74.125.204.113:80