GitHub

API reference for Raw.

A body the client hands to its transport as is (bytes, str, an iterable of bytes).

Attributes

AttributeTypeDescription
bodyobject
content_typestr | None = None
content_lengthint | None = None
tagLiteral['Raw'] = 'Raw'

Functions

__init__

__init__(body, content_type=None, content_length=None) -> None
ParameterTypeDescription
bodyobject
content_typestr | None = None
content_lengthint | None = None

to_json

to_json() -> dict[str, object]

Returns dict[str, object]

def to_json(self) -> dict[str, object]:
    return {
        "_id": "effect/HttpBody",
        "_tag": "Raw",
        "body": self.body,
        "content_type": self.content_type,
        "content_length": self.content_length,
    }