Commit 0eb41bd
authored
refactor: Buckets client to use
The overall aim of this PR is to work towards making the buckets client
easier to understand, primarily by making use of
`api.NewResponseFromHTTPResponse(...)`. It should:
- handle reading and closing of HTTP response bodies correctly
- reduce the amount of code in the client.
Furthermore, I suspect that handling responses correctly should help the
stability of the E2E tests, and ultimately of the client.
While I prefer `api.AsResponseOrError(...)` to
`api.NewResponseFromHTTPResponse(...)` as it saves even more code, we
seem to be moving away from that and it doesn't fit so well with the
current method signatures of the client.
The PR is broken up into several commits; code should still compile and
tests should pass after each one, as the functionality should remain the
same.api.NewResponseFromHTTPResponse(...) (#184)1 parent 97cc482 commit 0eb41bd
1 file changed
+111
-140
lines changed
0 commit comments