CURL COMMAND
OUTPUT
import requests

headers = {
    'Authorization': 'Bearer my-secret-token',
    'Content-Type': 'application/json',
}
json_data = {"name": "Alice", "email": "[email protected]"}

response = requests.post(
    'https://api.example.com/v1/users',
    headers=headers,
    json=json_data
)

print(response.status_code)
print(response.text)
SUPPORTED CURL FLAGS
-X, --request HTTP method
-H, --header Request header
-d, --data Request body
--data-raw Raw request body
--data-binary Binary request body
-u, --user Basic auth (user:pass)
-b, --cookie Cookies
-k, --insecure Disable SSL verification
--compressed Accept compressed responses
-L, --location Follow redirects
-I, --head HEAD request