ureq
ureq copied to clipboard
Response.all does not contain any reference to headers
I am using ureq
and was trying to get all response headers with a specific name.
To look for methods that do this I used the auto-completion of my IDE to look for methods containing the word "header" and did not find all
.
I propose to create a method on Request
and Response
called all_headers
or headers_all
which just calls all
internally.
This is a "hangover" from ureq being inspired by superagent.
All header related calls are just set
, has
, all
etc (it does avoid "get" since that could be confused with the method). It implicitly means that the only thing being set/has/all etc on requests and responses are headers.
Whether that's a good idea, shrug, that's the background. This could be revised in a future major version bump, in which case we shouldn't just address all
, but also has
and set
.
For now I think we just stay with the API we have, because having multiple calls doing the same thing I think would be more confusing.
That seems reasonable, thank you for the quick response