MCPcopy
hub / github.com/anthropics/anthropic-sdk-python / delete

Method delete

src/anthropic/_base_client.py:1590–1609  ·  view source on GitHub ↗
(
        self,
        path: str,
        *,
        cast_to: Type[ResponseT],
        body: Body | None = None,
        content: BinaryTypes | None = None,
        options: RequestOptions = {},
    )

Source from the content-addressed store, hash-verified

1588 return self.request(cast_to, opts)
1589
1590 def delete(
1591 self,
1592 path: str,
1593 *,
1594 cast_to: Type[ResponseT],
1595 body: Body | None = None,
1596 content: BinaryTypes | None = None,
1597 options: RequestOptions = {},
1598 ) -> ResponseT:
1599 if body is not None and content is not None:
1600 raise TypeError("Passing both `body` and `content` is not supported")
1601 if isinstance(body, bytes):
1602 warnings.warn(
1603 "Passing raw bytes as `body` is deprecated and will be removed in a future version. "
1604 "Please pass raw bytes via the `content` parameter instead.",
1605 DeprecationWarning,
1606 stacklevel=2,
1607 )
1608 opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, content=content, **options)
1609 return self.request(cast_to, opts)
1610
1611 def get_api_list(
1612 self,

Calls 2

requestMethod · 0.95
constructMethod · 0.45