(
self,
path: str,
*,
cast_to: Type[ResponseT],
body: Body | None = None,
content: BinaryTypes | None = None,
files: RequestFiles | None = None,
options: RequestOptions = {},
)
| 1358 | return self.request(cast_to, opts) |
| 1359 | |
| 1360 | def put( |
| 1361 | self, |
| 1362 | path: str, |
| 1363 | *, |
| 1364 | cast_to: Type[ResponseT], |
| 1365 | body: Body | None = None, |
| 1366 | content: BinaryTypes | None = None, |
| 1367 | files: RequestFiles | None = None, |
| 1368 | options: RequestOptions = {}, |
| 1369 | ) -> ResponseT: |
| 1370 | if body is not None and content is not None: |
| 1371 | raise TypeError("Passing both `body` and `content` is not supported") |
| 1372 | if files is not None and content is not None: |
| 1373 | raise TypeError("Passing both `files` and `content` is not supported") |
| 1374 | if isinstance(body, bytes): |
| 1375 | warnings.warn( |
| 1376 | "Passing raw bytes as `body` is deprecated and will be removed in a future version. " |
| 1377 | "Please pass raw bytes via the `content` parameter instead.", |
| 1378 | DeprecationWarning, |
| 1379 | stacklevel=2, |
| 1380 | ) |
| 1381 | opts = FinalRequestOptions.construct( |
| 1382 | method="put", url=path, json_data=body, content=content, files=to_httpx_files(files), **options |
| 1383 | ) |
| 1384 | return self.request(cast_to, opts) |
| 1385 | |
| 1386 | def delete( |
| 1387 | self, |
nothing calls this directly
no test coverage detected