Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2 discussion #9

Open
zbindenren opened this issue Nov 13, 2019 · 0 comments
Open

v2 discussion #9

zbindenren opened this issue Nov 13, 2019 · 0 comments

Comments

@zbindenren
Copy link
Member

zbindenren commented Nov 13, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant