HttpClient不适用于Fiddler

时间:2015-05-31 19:56:42

标签: c# asp.net-web-api httpclient fiddler

我已经通过论坛并尝试了这些技术,但仍然Fiddler无法捕获我的流量。任何帮助都会有所帮助。

以下与Fiddler合作,因此我的WebAPI服务器正在运行。我的C#客户端返回OK。

Toast.makeText()

主机文件

http://localhost:49305/api/Employee/12345

 #localhost name resolution is handled within DNS itself.
 #127.0.0.1       localhost
 #::1             localhost

1 个答案:

答案 0 :(得分:4)

使用localhost时这是一个已知问题。

您的网址为http://localhost:49305,您需要在localhost:.fiddler之后将其更改为包含http://localhost.fiddler:49305

完成此操作后,来自HttpClient的请求应出现在Fiddler中。

请参阅此问题:How can I trace the HttpClient request using fiddler or any other tool?