Search documentation

Type to search the documentation.

Generated API reference

classyak.Response

yak.Response

HTTP Response object returned from web endpoint functions.

HTTP Response object returned from web endpoint functions.

Python SDK reference · Yak 0.1.19release v0.1.19
provenancec2e8cf7c309abe376f390072b94a9ecd3e633080
Signature
python
Response(body: Union[Dict, str, bytes] = '', status: int = 200, headers: Dict[str, str] = dict(), content_type: str = 'application/json')

Parameters#

NameTypeDefaultDescription
bodypositional-or-keyword Union[Dict, str, bytes] ''

Response body (dict, str, or bytes)

statuspositional-or-keyword int 200

HTTP status code (default: 200)

headerspositional-or-keyword Dict[str, str] dict()

HTTP headers as dictionary

content_typepositional-or-keyword str 'application/json'

Content-Type header (default: application/json)

method

Response.to_dict#

Serialize response for gRPC transport.

Serialize response for gRPC transport.

Signature
python
to_dict() -> Dict[str, Any]

Returns#

Dict[str, Any]

Dictionary with body (bytes), status, headers, and content_type

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.