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
No easy way to construct http request with cache parameters
poor support for 304 responses
Right now I have to call GetResponseWithHeaders with my own header object. I suppose this is probably fine, but it's a bit of boiler plate code that the library could provide.
If I construct a request with an If-None-Match header and receive a 304 response, GetResponseWithHeaders will return a nil value for the response and an error with the 304 status code. It would be ideal if I had access to the response body so I could inspect resp.StatusCode instead of parsing the error
The text was updated successfully, but these errors were encountered:
It does not make sense at all to return an error for non-error HTTP status code; that is, if the status code is 2xx or 3xx, there should be no error, and a caller should get the response object.
I see two issues with supporting this currently
Right now I have to call
GetResponseWithHeaders
with my own header object. I suppose this is probably fine, but it's a bit of boiler plate code that the library could provide.If I construct a request with an
If-None-Match
header and receive a 304 response,GetResponseWithHeaders
will return a nil value for the response and an error with the 304 status code. It would be ideal if I had access to the response body so I could inspectresp.StatusCode
instead of parsing the errorThe text was updated successfully, but these errors were encountered: