MCPcopy Index your code
hub / github.com/pyscript/pyscript / bytearray

Method bytearray

core/src/stdlib/pyscript/fetch.py:67–74  ·  view source on GitHub ↗

Get response body as a Python bytearray. Returns a mutable bytearray containing the response data.

(self)

Source from the content-addressed store, hash-verified

65 return await self._response.blob()
66
67 async def bytearray(self):
68 """
69 Get response body as a Python bytearray.
70
71 Returns a mutable bytearray containing the response data.
72 """
73 buffer = await self._response.arrayBuffer()
74 return as_bytearray(buffer)
75
76 async def json(self):
77 """

Callers

nothing calls this directly

Calls 2

as_bytearrayFunction · 0.90
arrayBufferMethod · 0.45

Tested by

no test coverage detected