Skip to content

Commit

Permalink
feat: add application/json support for client
Browse files Browse the repository at this point in the history
  • Loading branch information
manisha1997 committed Nov 27, 2023
1 parent 833dee4 commit 54a1c08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion twilio/http/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def request(
"hooks": self.request_hooks,
}

if headers is not None and 'Content-Type' in headers.keys() and headers['Content-Type'] == 'application/json':
if headers and headers.get('Content-Type') == 'application/json':
kwargs['json'] = data
else:
kwargs['data'] = data
Expand Down

0 comments on commit 54a1c08

Please sign in to comment.