(
self,
path: str,
*,
cast_to: Type[ResponseT],
body: Body | None = None,
content: AsyncBinaryTypes | None = None,
files: RequestFiles | None = None,
options: RequestOptions = {},
)
| 1931 | return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls) |
| 1932 | |
| 1933 | async def patch( |
| 1934 | self, |
| 1935 | path: str, |
| 1936 | *, |
| 1937 | cast_to: Type[ResponseT], |
| 1938 | body: Body | None = None, |
| 1939 | content: AsyncBinaryTypes | None = None, |
| 1940 | files: RequestFiles | None = None, |
| 1941 | options: RequestOptions = {}, |
| 1942 | ) -> ResponseT: |
| 1943 | if body is not None and content is not None: |
| 1944 | raise TypeError(class="st">"Passing both `body` and `content` is not supported") |
| 1945 | if files is not None and content is not None: |
| 1946 | raise TypeError(class="st">"Passing both `files` and `content` is not supported") |
| 1947 | if isinstance(body, bytes): |
| 1948 | warnings.warn( |
| 1949 | class="st">"Passing raw bytes as `body` is deprecated and will be removed in a future version. " |
| 1950 | class="st">"Please pass raw bytes via the `content` parameter instead.", |
| 1951 | DeprecationWarning, |
| 1952 | stacklevel=2, |
| 1953 | ) |
| 1954 | opts = FinalRequestOptions.construct( |
| 1955 | method=class="st">"patch", |
| 1956 | url=path, |
| 1957 | json_data=body, |
| 1958 | content=content, |
| 1959 | files=await async_to_httpx_files(files), |
| 1960 | **options, |
| 1961 | ) |
| 1962 | return await self.request(cast_to, opts) |
| 1963 | |
| 1964 | async def put( |
| 1965 | self, |
nothing calls this directly
no test coverage detected