import requests # Specify the API URL we want to send our JSON to url = 'http://127.0.0.1:5000/webhook' # Specify the appropriate header for the POST request headers = {'Content-type': 'application/json'} # Specify the JSON data we want to send data = '{"title": "foo", "body": "bar", "userId": 1}' response = requests.post(url, headers=headers, data=data)