| 1384 | return self.request(cast_to, opts) |
| 1385 | |
| 1386 | def delete( |
| 1387 | self, |
| 1388 | path: str, |
| 1389 | *, |
| 1390 | cast_to: Type[ResponseT], |
| 1391 | body: Body | None = None, |
| 1392 | content: BinaryTypes | None = None, |
| 1393 | options: RequestOptions = {}, |
| 1394 | ) -> ResponseT: |
| 1395 | if body is not None and content is not None: |
| 1396 | raise TypeError("Passing both `body` and `content` is not supported") |
| 1397 | if isinstance(body, bytes): |
| 1398 | warnings.warn( |
| 1399 | "Passing raw bytes as `body` is deprecated and will be removed in a future version. " |
| 1400 | "Please pass raw bytes via the `content` parameter instead.", |
| 1401 | DeprecationWarning, |
| 1402 | stacklevel=2, |
| 1403 | ) |
| 1404 | opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, content=content, **options) |
| 1405 | return self.request(cast_to, opts) |
| 1406 | |
| 1407 | def get_api_list( |
| 1408 | self, |