Skip to content

Commit

Permalink
chore: adding contentType in post and put
Browse files Browse the repository at this point in the history
  • Loading branch information
tiwarishubham635 committed Jun 13, 2024
1 parent 55db7c2 commit 010849b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/base/BaseTwilio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ namespace Twilio {
});
headers["Accept-Charset"] = "utf-8";

if (opts.method === "post" && !headers["Content-Type"]) {
if ((opts.method === "post" || opts.method === "put") && !headers["Content-Type"]) {
headers["Content-Type"] = "application/x-www-form-urlencoded";
}

Expand Down

0 comments on commit 010849b

Please sign in to comment.