(self, mode: Literal["text", "binary"] = "text")
| 195 | return cast(bytes, message["bytes"]) |
| 196 | |
| 197 | def receive_json(self, mode: Literal["text", "binary"] = "text") -> Any: |
| 198 | message = self.receive() |
| 199 | self._raise_on_close(message) |
| 200 | if mode == "text": |
| 201 | text = message["text"] |
| 202 | else: |
| 203 | text = message["bytes"].decode("utf-8") |
| 204 | return json.loads(text) |
| 205 | |
| 206 | |
| 207 | class _TestClientTransport(httpx.BaseTransport): |
nothing calls this directly
no test coverage detected