Skip to content

Commit

Permalink
chore: adding contentType in post and put (#796)
Browse files Browse the repository at this point in the history
* chore: adding contentType in post and put
  • Loading branch information
tiwarishubham635 authored Jun 18, 2024
1 parent 98ffc7e commit ad1f208
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion twilio/base/client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ad1f208

Please sign in to comment.