Skip to content

Fix JSON Content-Type header for draft and other API requests#474

Open
pengfeiye wants to merge 1 commit into
mainfrom
CUST-4965-v-3-draft-endpoint-content-type-header-strict-equality-check-causes-python-sdk-failures-2
Open

Fix JSON Content-Type header for draft and other API requests#474
pengfeiye wants to merge 1 commit into
mainfrom
CUST-4965-v-3-draft-endpoint-content-type-header-strict-equality-check-causes-python-sdk-failures-2

Conversation

@pengfeiye
Copy link
Copy Markdown
Contributor

@pengfeiye pengfeiye commented Jun 5, 2026

Fix draft and other JSON API requests failing with "only JSON and multipart supported" by sending Content-Type: application/json instead of application/json; charset=utf-8.

The Nylas API rejects requests whose Content-Type includes a charset parameter. This change updates HttpClient._build_headers to set the header to application/json only, updates related test expectations, and adds a CHANGELOG entry under Unreleased.

License

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant