Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def run_post():
- url = 'http://httpbin.org/post'
- data = {'a': 10, 'b': [{'c': True, 'd': False}, None]}
- headers = {'Content-Type': 'application/json'}
- r = requests.post(url, data=json.dumps(data), headers=headers)
- return json.dumps(r.json(), indent=4)
Advertisement
Add Comment
Please, Sign In to add comment