提琴手不拦截PowerShell的Web请求 [英] Fiddler not intercepting PowerShell web requests

查看:163
本文介绍了提琴手不拦截PowerShell的Web请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用Fiddler帮助别人解决与问题调用-RestMethod 调用一个ASP.NET的WebAPI。不幸的是,当我打电话调用-RestMethod 在PowerShell中,提琴手不拦截HTTP通讯。

I'm trying to use Fiddler to help someone troubleshoot an issue with Invoke-RestMethod calls to an ASP.NET WebAPI. Unfortunately, when I call Invoke-RestMethod in PowerShell, Fiddler is not intercepting the HTTP communications.

当我使用Internet Explorer浏览ASP.NET网站,这是同一个应用程序的一部分的根源,小提琴手拦截流量预期。

When I use Internet Explorer to browse the root of the ASP.NET website, which is part of the same application, Fiddler intercepts traffic as expected.

任何人都可以解释为什么提琴手没有捕捉HTTP流量通过PowerShell中,如何解决这个问题?

Can anyone explain why Fiddler is not capturing HTTP traffic through PowerShell, and how to resolve this?

推荐答案

提琴手实际上是通过代理服务器的工作原理,并自动运行时,在IE中设置代理服务器设置。您可以通过启动小提琴手,然后检查下Internet选项局域网设置检查这个>连接。

Fiddler actually works via a proxy, and automatically sets proxy settings in IE when running. You can check this by launching fiddler and then checking "Lan Settings" under Internet Options > Connection.

调用-RestMethod 有可以使用指向提琴手的代理一个 -proxy 参数。我觉得默认的是127.0.0.1:8888:

Invoke-RestMethod has a -Proxy parameter you can use to point to Fiddler's proxy. I think the default is 127.0.0.1:8888 :

调用-RestMethod -proxyhttp://127.0.0.1:8888....

修改:添加截图,确认上面的答案

Edit: Adding screenshot to confirm the answer above.

这篇关于提琴手不拦截PowerShell的Web请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆