(
self,
path: str,
*,
cast_to: Type[ResponseT],
body: Body | None = None,
content: AsyncBinaryTypes | None = None,
files: RequestFiles | None = None,
options: RequestOptions = {},
)
| 2276 | return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls) |
| 2277 | |
| 2278 | async def patch( |
| 2279 | self, |
| 2280 | path: str, |
| 2281 | *, |
| 2282 | cast_to: Type[ResponseT], |
| 2283 | body: Body | None = None, |
| 2284 | content: AsyncBinaryTypes | None = None, |
| 2285 | files: RequestFiles | None = None, |
| 2286 | options: RequestOptions = {}, |
| 2287 | ) -> ResponseT: |
| 2288 | if body is not None and content is not None: |
| 2289 | raise TypeError("Passing both `body` and `content` is not supported") |
| 2290 | if files is not None and content is not None: |
| 2291 | raise TypeError("Passing both `files` and `content` is not supported") |
| 2292 | if isinstance(body, bytes): |
| 2293 | warnings.warn( |
| 2294 | "Passing raw bytes as `body` is deprecated and will be removed in a future version. " |
| 2295 | "Please pass raw bytes via the `content` parameter instead.", |
| 2296 | DeprecationWarning, |
| 2297 | stacklevel=2, |
| 2298 | ) |
| 2299 | opts = FinalRequestOptions.construct( |
| 2300 | method="patch", |
| 2301 | url=path, |
| 2302 | json_data=body, |
| 2303 | content=content, |
| 2304 | files=await async_to_httpx_files(files), |
| 2305 | **options, |
| 2306 | ) |
| 2307 | return await self.request(cast_to, opts) |
| 2308 | |
| 2309 | async def put( |
| 2310 | self, |
nothing calls this directly
no test coverage detected