saloon icon indicating copy to clipboard operation
saloon copied to clipboard

Connector default headers overwrite request body headers

Open Sammyjo20 opened this issue 1 year ago • 0 comments

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

Sammyjo20 avatar Apr 11 '24 10:04 Sammyjo20