| 1490 | return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) |
| 1491 | |
| 1492 | def patch( |
| 1493 | self, |
| 1494 | path: str, |
| 1495 | *, |
| 1496 | cast_to: Type[ResponseT], |
| 1497 | body: Body | None = None, |
| 1498 | content: BinaryTypes | None = None, |
| 1499 | files: RequestFiles | None = None, |
| 1500 | options: RequestOptions = {}, |
| 1501 | ) -> ResponseT: |
| 1502 | if body is not None and content is not None: |
| 1503 | raise TypeError("Passing both `body` and `content` is not supported") |
| 1504 | if files is not None and content is not None: |
| 1505 | raise TypeError("Passing both `files` and `content` is not supported") |
| 1506 | opts = FinalRequestOptions.construct( |
| 1507 | method="patch", url=path, json_data=body, content=content, files=to_httpx_files(files), **options |
| 1508 | ) |
| 1509 | return self.request(cast_to, opts) |
| 1510 | |
| 1511 | def put( |
| 1512 | self, |