You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the POST, PUT, and PATCH methods automatically set the content-type header of any request (that doesn't explicitly supply content-type in the headers keyword argument) to application/json. This happens even if you provide extra_headers on the ConnectionProperties object that specify the content type.
This means that if you are sending POST/PATCH/PUT requests to a non-JSON API, your requests will be sent with application/json as the content-type without your knowledge. This can be confusing for users and cause needless head scratching.
The text was updated successfully, but these errors were encountered:
Possibly related, but header names should be case-insensitive. If a post is made with headers={"Content-Type": "application/xml"}, the post request checks if "content-type" is in headers and adds "content-type" of "application/json". When _fix_headers is called in the request method, it converts everything to lower case, copies to a temporary dict. The order of this operation cannot be known, so it's not deterministic whether the headers will contain "content-type" of "application/json" or "application/xml".
Currently, the POST, PUT, and PATCH methods automatically set the
content-type
header of any request (that doesn't explicitly supplycontent-type
in theheaders
keyword argument) toapplication/json
. This happens even if you provideextra_headers
on theConnectionProperties
object that specify the content type.This means that if you are sending POST/PATCH/PUT requests to a non-JSON API, your requests will be sent with
application/json
as thecontent-type
without your knowledge. This can be confusing for users and cause needless head scratching.The text was updated successfully, but these errors were encountered: