Question

I am looking for a method to intercept http post requests with delphi without hooking any browser functions.Is that possible? How??

Was it helpful?

Solution

You could use something like WinPCap to grab intercept all packets looking specifically for packets on port 80 using the http protocol with a POST. There is a Delphi wrapper available which might be of some help. This is the same engine that is used by WireShark which would be useful by itself if your just having to do this manually or to debug an existing protocol.

OTHER TIPS

In stead of doing this in Delphi, you might want to consider good and scripteable free solutions like Http Fiddler?

Edit:

If you want to write a proper and fully fledged proxy from scratch, that works well with most of the idiosyncrasies of possible http clients and servers, be prepared for at least a couple of man-months work.

If you are willing to use at least some base libaries, then look into this question.

--jeroen

You'd have to create an application that acted like a local Proxy Server that caught all requests made and then forwarded them out to the appropriate server.

I'm not sure which version of Delphi you're using, but you might want to check out this sample Proxy Server in C# and see if you can port the basics to suit your needs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top