"llm/vscode:/vscode.git/clone" did not exist on "bd93a94abdee7ceef24f13c529f2b04a6ea749fd"
webhook.py 231 Bytes
Newer Older
Timothy J. Baek's avatar
Timothy J. Baek committed
1
2
3
4
5
6
7
8
9
10
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