Skip to content

Instantly share code, notes, and snippets.

@Sytten
Created May 19, 2020 00:49
Show Gist options
  • Save Sytten/331fbffe33ea8d40c397301778f8ad0a to your computer and use it in GitHub Desktop.
Save Sytten/331fbffe33ea8d40c397301778f8ad0a to your computer and use it in GitHub Desktop.
failing-revenge-api-call
def _api(endpoint):
high_school_uri = _get_school_uri()
if high_school_uri:
from frontend import legacy_http
req = legacy_http.request(request.method, f'{high_school_uri}{endpoint}')
ans = json.loads(req.output)
_err_handle(ans)
return (ans)
else:
return {'status':'err',
'description':'Can\'t locate school API!'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment