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
Currently the vast majority of client.Client functions return http.Reponse, which is pretty unhelpful for the most part, and requires a lot of fiddling with response bodies etc on the user end
// Reset shuts down deployment and deletes the contents of the deployment's// project directoryfunc (c*Client) Reset() (*http.Response, error) {
returnc.post("/reset", nil)
}
We should update these so that they handle http responses internally (and return errors if needed) and instead of returning the raw responses, return some more predictable stuff. Client.Reset(), for example, could just be:
func (c*Client) Reset() error {
/* handle http.Response and do stuff */
}
Theres a bit of code repetition in the client that we can probably improve on as well
This is not a particularly trivial PR, and might require a few passes.
The text was updated successfully, but these errors were encountered:
* client: rework function returns to remove http.Response
* client: split out UserClient
* client: add debugging output
* deps: update to include gorilla/[email protected]
* daemon: correct /logs response message
* docs: fix incorrect /logs documentation, regenerate tip documentation
* ci: build daemon with tag 'test', fix bootstrap test to use version 'test'
closes#236
Currently the vast majority of client.Client functions return
http.Reponse
, which is pretty unhelpful for the most part, and requires a lot of fiddling with response bodies etc on the user endWe should update these so that they handle http responses internally (and return errors if needed) and instead of returning the raw responses, return some more predictable stuff.
Client.Reset()
, for example, could just be:Theres a bit of code repetition in the client that we can probably improve on as well
This is not a particularly trivial PR, and might require a few passes.
The text was updated successfully, but these errors were encountered: