Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat: json content type #737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 1, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: add application/json support for client
  • Loading branch information
manisha1997 committed Nov 27, 2023
commit 833dee4415facf6e2f0580057fcb7a6adfdd8dac
6 changes: 5 additions & 1 deletion 6 twilio/http/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,16 @@ def request(
"method": method.upper(),
"url": url,
"params": params,
"data": data,
"headers": headers,
"auth": auth,
"hooks": self.request_hooks,
}

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

self.log_request(kwargs)

self._test_only_last_response = None
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.