A byte stream, sent as it is pulled. Its failure fails the request
with an EncodeError.
Attributes#
| Attribute | Type | Description |
|---|---|---|
stream | Stream_[bytes, object] | |
content_type | str = 'application/octet-stream' | |
content_length | int | None = None | |
tag | Literal['Stream'] = 'Stream' |
Functions#
__init__#
__init__(stream, content_type='application/octet-stream', content_length=None) -> None| Parameter | Type | Description |
|---|---|---|
stream | Stream_[bytes, object] | |
content_type | str = 'application/octet-stream' | |
content_length | int | 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": "Stream",
"content_type": self.content_type,
"content_length": self.content_length,
}