feat: simplify httpc (#1748)

* feat: simplify httpc

* chore: fix lint errors

* chore: fix log url issue

* chore: fix log url issue

* refactor: handle resp & err in ResponseHandler

* chore: remove unnecessary var names in return clause
This commit is contained in:
Kevin Wan
2022-04-03 14:32:27 +08:00
committed by GitHub
parent e0fa8d820d
commit 78ea0769fd
8 changed files with 91 additions and 86 deletions

View File

@@ -4,5 +4,5 @@ import "net/http"
type (
Interceptor func(r *http.Request) (*http.Request, ResponseHandler)
ResponseHandler func(*http.Response)
ResponseHandler func(resp *http.Response, err error)
)