Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Issue with sending header values twice #148

Closed
@justmobilize

Description

@justmobilize

When helping a member in the discord channel #help-with-circuitpython, I had made the mistake of thinking that this library didn't automatically deal with turning a dict into a urlencoded string. I had them convert it by hand and try and it worked.

As it turns out - it does, but also sends the header Content-Type: application/x-www-form-urlencoded, which some systems (Spotify as one) can't handle getting the header twice.

I would like to open a PR to check the header for an existing Content-Type before adding it's own (both for urlencoded and json). It would implement a method to check for an existing value since we would also want to check for casing mis-matches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions