有没有办法在.NET编程听HTTP流量? [英] Is there any way in .NET to programmatically listen to HTTP traffic?

查看:133
本文介绍了有没有办法在.NET编程听HTTP流量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的浏览器自动化测试的网站,但我需要验证从浏览器(例如,图像,外部脚本,XmlHtt prequest对象)的HTTP请求。有没有一种方法以编程实例化一个代理服务器或数据包嗅探器的浏览器来使用,以看看它的发送?

I'm using browser automation for testing web sites but I need to verify HTTP requests from the browser (i.e., images, external scripts, XmlHttpRequest objects). Is there a way to programmatically instantiate a proxy or packet sniffer for the browser to use in order to see what its sending?

我已经使用招看流量,但我想要的东西,是UI少,我可以在持续构建集成使用。

I'm already using Fiddler to watch the traffic but I want something that's UI-less that I can use in continuous build integration.

我可以很容易地从WinPcap的获得HTTP特定的信息?

Can I easily get the HTTP-specific information from WinpCap?

推荐答案

尝试 WinPcap的。它的驱动器/库组合,其可用于监测的数据包。根据您正在尝试做的(手表交通瓦特/ OA UI)是什么,这可能是比写自己代理一个简单的解决方案。

Try winpcap . It's a driver/library combination which can be used to monitor packets. Based on what you are trying to do (watch traffic w/o a UI), this is probably a simpler solution than writing your own proxy.

这篇关于有没有办法在.NET编程听HTTP流量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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