分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 软件开发

使用fiddler模拟http get

发布时间:2023-09-06 01:27责任编辑:顾先生关键词:http

wireshark抓到一个http get数据包

GET /Hero/zhCN/client/alert?build=zhCN&targetRegion=0&homeCountry= HTTP/1.1
User-Agent: Blizzard Web Client
Host: nydus.battle.net
Cache-Control: no-cache

HTTP/1.1 302 Found
Date: Sat, 25 Nov 2017 03:15:30 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Cache-Control: max-age=3600
Location: http://INVALID.launcher.battle.net/service/Hero/alert/zh-cn
Content-Length: 243
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="http://INVALID.launcher.battle.net/service/Hero/alert/zh-cn">here</a>.</p>
</body></html>

是一个302重定向。

在composer选项卡中,选择get方法,并且把host组装到url中。协议可以在下拉列表中选择。

http://nydus.battle.net//Hero/zhCN/client/alert?build=zhCN&targetRegion=0&homeCountry=

 执行完成后,会发现,得到一个http 302重定向。

然后返回的url是http://invalid.launcher.battle.net/service/Hero/alert/zh-cn。对这个url做get请求,协议是http/1.1。

GET http://invalid.launcher.battle.net/service/Hero/alert/zh-cn HTTP/1.1
User-Agent: Blizzard Web Client
Host: invalid.launcher.battle.net
Cache-Control: no-cache

 这个请求执行后,是http 502。

使用fiddler模拟http get

原文地址:http://www.cnblogs.com/chucklu/p/7895310.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved