Skip to content

filter duplicate header #80

@roccomuso

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?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions