mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-04 12:52:28 +08:00
release: update readme.file v1.0.8, ParseHttpResponse in netutil/request.go
This commit is contained in:
@@ -45,7 +45,7 @@ func HttpPatch(url string, params ...interface{}) (*http.Response, error) {
|
||||
return request(http.MethodPatch, url, params...)
|
||||
}
|
||||
|
||||
// ParseHttpResponse convert the http response to interface{} obj
|
||||
// ParseHttpResponse decode http response to specified interface
|
||||
func ParseHttpResponse(resp *http.Response, obj interface{}) error {
|
||||
if resp == nil {
|
||||
return errors.New("InvalidResp")
|
||||
|
||||
Reference in New Issue
Block a user