Releases: xgfone/go-http-client
Releases · xgfone/go-http-client
v0.19.2
v0.19.1
v0.19.0
- Refactor the inner implementation.
- Added:
- Add the
BaseURL,Domethods forClient. - Add the
Doerinterface instead of*http.Client.
- Add the
- Removed:
- Remove the header constants.
- Remove the
ToErrormethod from theResponsetype. - Remove the
XxxJSONandXxxJSONContentfunctions, and useXxxContextinstead. - Remove the unused
Decodertype, and theCloseBody,GetContentType,NewRequestWithContextfunctions.
- Changed:
- The
Hookinterface returns a new error type argument. - Remove the first argument
codefrom theNewErrorfunction signature.
- The
v0.18.0
v0.17.1
v0.17.0
- New:
- The default request body encoder
EncodeDatasupports to encode the request body toapplication/x-www-form-urlencoded. - Add the method
ReqBodyforResponseto return the original request body.
- The default request body encoder
- Fixed:
- Fix a panic when failing to new
http.Request. - Fix the request body buffer bug.
- Retract the version
v0.16.0.
- Fix a panic when failing to new
v0.16.0
v0.15.0
v0.14.0
- New:
- Support a function as the response result to customize the response body decoder.
- Support to set a default response handler.
- Others:
- Use
SetBodyEncoderinstead ofSetReqBodyEncoder. - The default response body decoder ignores the body if status code is equal to
204or in[300, 400).
- Use