Closed synth closed 10 years ago
why does unirest add the header itself? why doesn't it leverage net::http's mechanism?
@synth I've just updated the gem with a fix that should have fixed the bug - can you please try again now (update the gem first)?
great, updated and works for me, thx.
Unirest encodes Authorization header data slightly differently than Net::HTTP. I actually hit this insidious bug while building an api wrapper to TangoCard Raas api. I kept getting "Request header field is missing ':' separator." and couldn't for the life of me figure it out. I spent 4 hours digging through source and manually crafting Net::HTTP requests.
Finally, I realized the Authorization header that Unirest creates has a newline in it, but those created by Net::HTTP, didn't.
In Unirest:
In Net::HTTP
Not sure what should be done here...