aknuds1
aknuds1

Reputation: 68127

How do I debug HTTPS post requests from my commandline program?

I am trying to write a Python program that POSTs a build request to a Jenkins server over HTTPS. I have tried PycURL, which works well, but am now trying to replace that with standard library facilities. The revised program receives a 404 response from the server however, so I would like to inspect both versions of the program's actual POST requests to the server (with and without PycURL) to see what's different.

Which tool can I use to capture my program's POST requests and analyze them?

Upvotes: 0

Views: 2407

Answers (3)

Pratik Deoghare
Pratik Deoghare

Reputation: 37212

You can use wireshark.

But wireshark gives dumps overwhelming amount of data.

So choose any packet in the dump.

Right click and Follow Stream.

Read good tutorial here.

Upvotes: 0

Wolfwyrd
Wolfwyrd

Reputation: 15916

If you can specify a proxy with your application then take a look at Fiddler. It will man in the middle HTTPS requests and give you a good overview of exactly whats going in and out. As also mentioned WireShark may be of use to you if you cannot use a proxy as it will capture the raw traffic but it can be fiddly to use.

Upvotes: 1

Nightw0rk
Nightw0rk

Reputation: 419

Use the program to dump the traffic tcpdump or WireShark

Upvotes: 0

Related Questions