Skip to content

Instantly share code, notes, and snippets.

@tkremmel
Created July 30, 2014 08:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkremmel/aa29478c0a487fac4970 to your computer and use it in GitHub Desktop.
Save tkremmel/aa29478c0a487fac4970 to your computer and use it in GitHub Desktop.
Python: Inspect POST request using ipdb
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