MCPcopy Create free account
hub / github.com/tiny-pilot/tinypilot / parse

Function parse

app/request_parsers/requires_https.py:5–13  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

3
4
5def parse(request):
6 # pylint: disable=unbalanced-tuple-unpacking
7 (requires_https,) = json.parse_json_body(request,
8 required_fields=['requiresHttps'])
9
10 if not isinstance(requires_https, bool):
11 raise errors.InvalidRequiresHttpsPropError(
12 'Property `requiresHttps` is required and must be a boolean.')
13 return requires_https

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected