From 88f6623004956a660ac4a6b572058cd24ced1435 Mon Sep 17 00:00:00 2001 From: AsabuHere Date: Thu, 12 Dec 2024 11:04:21 +0530 Subject: [PATCH] removing accept headers for delete operation --- twilio/base/client_base.py | 5 +++++ twilio/rest/preview_iam/versionless/organization/user.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/twilio/base/client_base.py b/twilio/base/client_base.py index b842f3e2c..a6e47c4f1 100644 --- a/twilio/base/client_base.py +++ b/twilio/base/client_base.py @@ -101,6 +101,9 @@ def request( else: auth = None + if method == 'DELETE': + del headers["Accept"] + uri = self.get_hostname(uri) filtered_data = self.copy_non_none_values(data) return self.http_client.request( @@ -147,6 +150,8 @@ async def request_async( ) headers = self.get_headers(method, headers) + if method == 'DELETE': + del headers["Accept"] ##If credential provider is provided by user, get the associated auth strategy ##Using the auth strategy, fetch the auth string and set it to authorization header diff --git a/twilio/rest/preview_iam/versionless/organization/user.py b/twilio/rest/preview_iam/versionless/organization/user.py index 54cd2edd9..3421780de 100644 --- a/twilio/rest/preview_iam/versionless/organization/user.py +++ b/twilio/rest/preview_iam/versionless/organization/user.py @@ -253,7 +253,7 @@ async def fetch_async(self) -> "UserInstance": def update(self, scim_user: ScimUser, if_match: Union[str, object]=values.unset) -> "UserInstance": - """hello3 + """ Update the UserInstance :param scim_user: