I am using Flask to create some json API's and use them with software that doesn't know about HTTP (just plain old network sockets). Is there a way I can dump the entire http request to the console? Headers, body and all? I want to be able to use this dump to talk to it over something like a telnet connection, so I'm looking for whole request. If Flask can't do this kind of logging, any other ideas?

有帮助吗?

解决方案

The best way I've figure out to do this is use Wireshark, and its "Follow TCP Stream" feature. This will give me a dump of an entire http transaction, at the protocol level.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top