Skip to content

Instantly share code, notes, and snippets.

@csarigoz
Last active May 15, 2024 07:28
Show Gist options
  • Save csarigoz/6fbaffc6894615d209e1d0d05451543f to your computer and use it in GitHub Desktop.
Save csarigoz/6fbaffc6894615d209e1d0d05451543f to your computer and use it in GitHub Desktop.
Example webhook request to send from PetScreening to CitizenShipper
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