Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 6.1
Bug fix? no
New feature? yes (minor)
Deprecations? no
Tickets -
License MIT
Doc PR -

This improves the default behavior of handling the content-type header: with this PR, when an array is passed as body, the content-type is forced to application/x-www-form-urlencoded.

This allows setting a content-type in the default options and have it overridden when passing an array as body.

Spotted while reviewing #45791, where the proposed behavior would have allowed a cleaner patch.

@fabpot
Copy link
Member

fabpot commented Mar 23, 2022

Thank you @nicolas-grekas.

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

Successfully merging this pull request may close these issues.

4 participants