mirror of
https://github.com/open-webui/open-webui.git
synced 2025-10-11 05:13:06 +02:00
feat: webhook backend
This commit is contained in:
11
backend/utils/webhook.py
Normal file
11
backend/utils/webhook.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import requests
|
||||
|
||||
|
||||
def post_webhook(url: str, json: dict) -> bool:
|
||||
try:
|
||||
r = requests.post(url, json=json)
|
||||
r.raise_for_status()
|
||||
return True
|
||||
except Exception as e:
|
||||
print(e)
|
||||
return False
|
Reference in New Issue
Block a user