14 lines
357 B
Python
14 lines
357 B
Python
|
|
import json
|
||
|
|
import requests
|
||
|
|
from utilfuncs import Utils
|
||
|
|
import sys
|
||
|
|
|
||
|
|
URL = "http://127.0.0.1:8000/webhook"
|
||
|
|
HEADERS = {"content-type": "application/json"}
|
||
|
|
file = sys.argv[1]
|
||
|
|
my_campus_payload = Utils.load_json_from_file(file)
|
||
|
|
|
||
|
|
response = requests.post(URL, headers=HEADERS, json=json.dumps(my_campus_payload))
|
||
|
|
print(response.status_code)
|
||
|
|
print(response.text)
|