(
self,
path: str,
*,
cast_to: Type[ResponseT],
body: Body | None = None,
content: BinaryTypes | None = None,
files: RequestFiles | None = None,
options: RequestOptions = {},
)
| 1562 | return self.request(cast_to, opts) |
| 1563 | |
| 1564 | def put( |
| 1565 | self, |
| 1566 | path: str, |
| 1567 | *, |
| 1568 | cast_to: Type[ResponseT], |
| 1569 | body: Body | None = None, |
| 1570 | content: BinaryTypes | None = None, |
| 1571 | files: RequestFiles | None = None, |
| 1572 | options: RequestOptions = {}, |
| 1573 | ) -> ResponseT: |
| 1574 | if body is not None and content is not None: |
| 1575 | raise TypeError("Passing both `body` and `content` is not supported") |
| 1576 | if files is not None and content is not None: |
| 1577 | raise TypeError("Passing both `files` and `content` is not supported") |
| 1578 | if isinstance(body, bytes): |
| 1579 | warnings.warn( |
| 1580 | "Passing raw bytes as `body` is deprecated and will be removed in a future version. " |
| 1581 | "Please pass raw bytes via the `content` parameter instead.", |
| 1582 | DeprecationWarning, |
| 1583 | stacklevel=2, |
| 1584 | ) |
| 1585 | opts = FinalRequestOptions.construct( |
| 1586 | method="put", url=path, json_data=body, content=content, files=to_httpx_files(files), **options |
| 1587 | ) |
| 1588 | return self.request(cast_to, opts) |
| 1589 | |
| 1590 | def delete( |
| 1591 | self, |
nothing calls this directly
no test coverage detected