From ad1f20889c159cb2dbb7ad1327c5e3c79635ea70 Mon Sep 17 00:00:00 2001 From: Shubham Date: Tue, 18 Jun 2024 16:45:02 +0530 Subject: [PATCH] chore: adding contentType in post and put (#796) * chore: adding contentType in post and put --- twilio/base/client_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twilio/base/client_base.py b/twilio/base/client_base.py index c9e0f9c48..5f17c7540 100644 --- a/twilio/base/client_base.py +++ b/twilio/base/client_base.py @@ -184,7 +184,7 @@ def get_headers( # Types, encodings, etc. headers["Accept-Charset"] = "utf-8" - if method == "POST" and "Content-Type" not in headers: + if (method == "POST" or method == "PUT") and ("Content-Type" not in headers): headers["Content-Type"] = "application/x-www-form-urlencoded" if "Accept" not in headers: headers["Accept"] = "application/json"