MCPcopy
hub / github.com/vladmandic/sdnext / get

Function get

cli/api-preprocess.py:29–34  ·  view source on GitHub ↗
(endpoint: str, dct: dict | None = None)

Source from the content-addressed store, hash-verified

27
28
29def 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
37def post(endpoint: str, dct: dict | None = None):

Callers 1

infoFunction · 0.70

Calls 2

authFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected