Created
December 12, 2024 12:04
-
-
Save sttts/3b1308e2d91f0098e20f283b0a63df47 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
def call_webhook(): | |
url = "https://webhook.site/a38d67a3-a94a-4621-a5cb-779f9347f959" | |
payload = { | |
"message": "Hello, Webhook!", | |
"status": "success" | |
} | |
headers = { | |
"Content-Type": "application/json" | |
} | |
response = requests.post(url, json=payload, headers=headers) | |
print(f"Status Code: {response.status_code}") | |
print(f"Response Body: {response.text}") | |
if __name__ == "__main__": | |
call_webhook() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment