MCPcopy Index your code
hub / github.com/httpie/cli / as_bytes

Function as_bytes

httpie/uploads.py:65–69  ·  view source on GitHub ↗
(data: Union[str, bytes])

Source from the content-addressed store, hash-verified

63
64
65def as_bytes(data: Union[str, bytes]) -> bytes:
66 if isinstance(data, str):
67 return data.encode()
68 else:
69 return data
70
71
72CallbackT = Callable[[bytes], bytes]

Callers 2

prepare_request_bodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected