-
Notifications
You must be signed in to change notification settings - Fork 35
Issue with sending header values twice #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@justmobilize I am re-opening this issue as #149 is causing a "TypeError: wrong number of arguments" error as seen here: adafruit/Adafruit_CircuitPython_AdafruitIO#115. I am also able to locally reproduce this. The issue appears to be with doing a GET with only headers like in
Tracing through this, your new On L561, in @justmobilize Would you be able to resolve this? Do you want me to resolve this? |
@brentru I'm happy to take a look at this |
@brentru looking, my PR just changed from If it's Looking into their code they: I'll get a PR opened with tests in the next day or so. I might recommend |
Code change here: #152. Want to make sure the method makes sense, then will add tests |
@brentru just waiting on an initial code review |
@brentru my code fix is merged. Can you confirm it fixes the issue and close this? |
Scratch that. I see the user already tested. Closing. |
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 adict
into aurlencoded
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 forurlencoded
andjson
). It would implement a method to check for an existing value since we would also want to check for casing mis-matches.The text was updated successfully, but these errors were encountered: