How can I see the entire HTTP request that's being sent by my Python application?

前端 未结 5 988
暖寄归人
暖寄归人 2020-11-22 13:37

In my case, I\'m using the requests library to call PayPal\'s API over HTTPS. Unfortunately, I\'m getting an error from PayPal, and PayPal support cannot figure

5条回答
  •  误落风尘
    2020-11-22 14:30

    You can use HTTP Toolkit to do exactly this.

    It's especially useful if you need to do this quickly, with no code changes: you can open a terminal from HTTP Toolkit, run any Python code from there as normal, and you'll be able to see the full content of every HTTP/HTTPS request immediately.

    There's a free version that can do everything you need, and it's 100% open source.

    I'm the creator of HTTP Toolkit; I actually built it myself to solve the exact same problem for me a while back! I too was trying to debug a payment integration, but their SDK didn't work, I couldn't tell why, and I needed to know what was actually going on to properly fix it. It's very frustrating, but being able to see the raw traffic really helps.

提交回复
热议问题