Search documentation

Type to search the documentation.

Generated API reference

classyak.Request

yak.Request

HTTP Request object passed to web endpoint functions.

HTTP Request object passed to web endpoint functions.

Python SDK reference · Yak 0.1.19release v0.1.19
provenancec2e8cf7c309abe376f390072b94a9ecd3e633080
Signature
python
Request(method: str, path: str, headers: Dict[str, str], query_params: Dict[str, str], body: bytes, json_body: Optional[Any] = None)

Parameters#

NameTypeDefaultDescription
methodpositional-or-keyword str —

HTTP method (GET, POST, PUT, DELETE, etc.)

pathpositional-or-keyword str —

Request path

headerspositional-or-keyword Dict[str, str] —

HTTP headers as dictionary

query_paramspositional-or-keyword Dict[str, str] —

Query string parameters as dictionary

bodypositional-or-keyword bytes —

Raw request body as bytes

json_bodypositional-or-keyword Optional[Any] None

Cached parsed JSON body (lazy loaded)

property

Request.json#

Parse body as JSON (cached).

Parse body as JSON (cached).

Returns#

Any

Parse body as JSON (cached).

Raises#

  • json.JSONDecodeError

    If body is not valid JSON

Related guides

Live Apps
BoundaryPreview limitations
  • This page is generated from the pinned release schema; update the site pin when a new release should be documented.
  • Lifecycle, persistence and operational context belong in the linked handwritten guides.