You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 16, 2022. It is now read-only.
An ops-minded coworker pointed out that this was missing from my Magicbane-powered requests. There should be some default, since a lot of APIs will reject any request without one.
The text was updated successfully, but these errors were encountered:
We'll need some actual "set header" functionality in that case… e.g. currently the form/json functions replace all headers with Content-Type. (Wait, maybe a User-Agent is already present on defaultRequest and this is what removes it?)
Ah, that's very likely -- I'm sure I remember there being a default set when I used http-conduit a few projects back. I've got a function in my local codebase that's roughly union newHeaders existingHeaders, I'll see about making it generic and sending a PR tomorrow.
Unfortunately there is no User-Agent in defaultRequest. But #14 makes it far easier to add one downstream, and also prevents postForm/postJson clobbering headers added before their use.
I didn't directly address this for now, to avoid messing with style/structure too much -- e.g. I'm not sure if having unqualified export lists is a priority -- and also I have no idea what the agent string should be.
An ops-minded coworker pointed out that this was missing from my Magicbane-powered requests. There should be some default, since a lot of APIs will reject any request without one.
The text was updated successfully, but these errors were encountered: