Commit graph

5 commits

Author SHA1 Message Date
Brian C. Lane
7c86dc533c client: Add GetRawBody function to return the io.ReadCloser from the request
And refactor GetRaw to use it.
2020-04-15 11:35:05 +02:00
Brian C. Lane
271d27a41d client: Add /projects/ support 2020-03-25 10:01:14 +01:00
Brian C. Lane
46c3bed153 client: Use http.Client instead of a string for the socket
This converts the client and weldrcheck functions to use http.Client for
connections instead of passing around the socket path and opening it for
each test.
2020-03-09 18:02:54 +01:00
Brian C. Lane
9dafb3337b Refactor error handling in the client code
client errors are now returned as an 'error', API errors as APIResponse.
2020-03-03 12:21:40 +01:00
Brian C. Lane
cfa4233db5 client: Add client helper functions for API testing and future cli tools
This package will contain functions for communicating with the API that
can be used in both the integration tests as well as in a future cmdline
tool similar to composer-cli

When possible the client functions will return the same structures used
by weldr/api.go which have been exported in weldr/json.go
2020-03-03 12:21:40 +01:00