Here's an example of how to make a HTTP POST request in Python using the urllib
module:
main.py381 chars13 lines
This example sends a POST request to https://www.example.com/api/v1
with the data {'name': 'John Doe', 'email': 'johndoe@example.com'}
in the body of the request. The response is then decoded and printed to the console.
gistlibby LogSnag