10000 chore: adding contentType in post and put (#796) · CodeAiModels/twilio-python@ad1f208 · GitHub
[go: up one dir, main page]

Skip to content

Commit ad1f208

Browse files
chore: adding contentType in post and put (twilio#796)
* chore: adding contentType in post and put
1 parent 98ffc7e commit ad1f208

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

twilio/base/client_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def get_headers(
184184

185185
# Types, encodings, etc.
186186
headers["Accept-Charset"] = "utf-8"
187-
if method == "POST" and "Content-Type" not in headers:
187+
if (method == "POST" or method == "PUT") and ("Content-Type" not in headers):
188188
headers["Content-Type"] = "application/x-www-form-urlencoded"
189189
if "Accept" not in headers:
190190
headers["Accept"] = "application/json"

0 commit comments

Comments
 (0)
0