(
self,
path: str,
*,
content: Any, # bytes or an iterator of bytes (streaming body)
extra_headers: dict[str, str],
params: dict[str, Any] | None = None,
)
| 105 | return self._request("DELETE", path, params=params) |
| 106 | |
| 107 | def put_binary( |
| 108 | self, |
| 109 | path: str, |
| 110 | *, |
| 111 | content: Any, # bytes or an iterator of bytes (streaming body) |
| 112 | extra_headers: dict[str, str], |
| 113 | params: dict[str, Any] | None = None, |
| 114 | ) -> Any: |
| 115 | headers = self._headers() |
| 116 | # Drop the default JSON content-type; a binary upload supplies its own |
| 117 | # via extra_headers, or omits it so the server infers from the path. |
| 118 | headers.pop("content-type", None) |
| 119 | headers.update(extra_headers) |
| 120 | response = self._client.request( |
| 121 | "PUT", path, params=params, content=content, headers=headers |
| 122 | ) |
| 123 | return self._handle_response(response) |
| 124 | |
| 125 | def _request( |
| 126 | self, |
no test coverage detected