Custom Response
Instead of http.Response
return a httpclient.Response
like:
type struct httpclient.Response {
*http.Response
reqDump []byte
bodyDump []byte
}
This could possibly fix #8 .
It would add the possibility to add a Dump
method which dumps request or response.
Debug Option
Add Debug option to dump requests and responses.
Do not export RequestCallback
and ResponseCallback
Use an unexported slice of callbacks and append custom callbacks. If we initiate the slice with the default error handler we do not need additional documentation for error handling
Propagate error.
Make options thread-safe
Currently it is possible to change an already initiated client with the functional options. For example it is possible to change the http.client
with httpclient.WithHTTPClient
Do not embed Client in struct.