Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
Indexed
MCP
copy
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
65
def
as_bytes(data: Union[str, bytes]) -> bytes:
66
if
isinstance(data, str):
67
return
data.encode()
68
else
:
69
return
data
70
71
72
CallbackT = Callable[[bytes], bytes]
Callers
2
_read_file_with_selectors
Function · 0.85
prepare_request_body
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected