开发者

How to capture HTTP response with C#?

开发者 https://www.devze.com 2022-12-23 21:33 出处:网络
How do I cap开发者_如何学Goture HTTP response when the request is made by web browser? Webpage retrieves data (with post) from a service.

How do I cap开发者_如何学Goture HTTP response when the request is made by web browser?

Webpage retrieves data (with post) from a service. Service returns a json object. What I want is to capture that json and parse it in realtime.

What would be the simplest way to do it?


Your best bet is to use Fiddler, perhaps with the JSON viewer add-on.

From the homepage:

Fiddler is a Web Debugging Proxy which logs all HTTP(S) traffic between your computer and the Internet. Fiddler allows you to inspect all HTTP(S) traffic, set breakpoints, and "fiddle" with incoming or outgoing data. Fiddler includes a powerful event-based scripting subsystem, and can be extended using any .NET language.


Try googling for HttpModule in .Net. They are some sort of filters. HTTP requests and responses flow through them and can manipulate the content.

0

精彩评论

暂无评论...
验证码 换一张
取 消