Created
July 30, 2014 08:54
-
-
Save tkremmel/aa29478c0a487fac4970 to your computer and use it in GitHub Desktop.
Python: Inspect POST request using ipdb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ipdb | |
ipdb.set_trace() | |
from requests import Request, Session | |
s = Session() | |
req = Request('POST', url, | |
data=data | |
) | |
prepped = req.prepare() | |
s.send(prepped) | |
# In ipdb | |
print(prepped.body.replace('&','\n')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment