saloon
saloon copied to clipboard
Connector default headers overwrite request body headers
I recently ran into an issue where my connector had a default Content-Type of application/json and the request had a different Content-Type added by the body trait (HasFormBody) but because of the new PendingRequest order, the connector headers were overwriting the trait's headers.
I think in future versions of Saloon it should work like so:
- Trait Headers for connector
- Default Headers for connector THEN
- Merge trait headers from request
- Merge default headers from request