(endpoint: str, dct: dict | None = None)
| 27 | |
| 28 | |
| 29 | def get(endpoint: str, dct: dict | None = None): |
| 30 | req = requests.get(f'{sd_url}{endpoint}', json=dct, timeout=300, verify=False, auth=auth()) |
| 31 | if req.status_code != 200: |
| 32 | return { 'error': req.status_code, 'reason': req.reason, 'url': req.url } |
| 33 | else: |
| 34 | return req.json() |
| 35 | |
| 36 | |
| 37 | def post(endpoint: str, dct: dict | None = None): |