Skip to content

filter duplicate header #80

Description

@roccomuso

Since you have a lot of possibilities when gluing together methods you can easily mess up the requests.
I did something like:

wretch(url).headers( 'content-type': 'application/json' ).post(...).json()
// one of these methods added another application/json header

and saw that in my requests I had duplicate header: Content-Type: application/json, application/json. Causing my server to reject the request.
This shouldn't be possible. Maybe worth filtering duplicate header?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions