Last active
May 15, 2024 07:28
-
-
Save csarigoz/6fbaffc6894615d209e1d0d05451543f to your computer and use it in GitHub Desktop.
Example webhook request to send from PetScreening to CitizenShipper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
# URL of the webhook | |
url = 'ENTER_THE_WEBHOOK_URL_HERE' | |
# Parameters to be sent in the POST request | |
data = { | |
'email': 'cagri@citizenshipper.com', | |
'first_name': 'Cagri' | |
} | |
# Headers for the POST request | |
headers = { | |
'Content-Type': 'application/json' | |
} | |
# Send the POST request | |
response = requests.post(url, headers=headers, data=json.dumps(data)) | |
# Print the status code and response content | |
print("Status Code:", response.status_code) | |
print("Response:", response.text) | |
## Response if successful | |
# Status Code: 200 | |
# Response: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment