clean code
This commit is contained in:
parent
59a8ce9a9d
commit
cd667a868d
@ -84,9 +84,6 @@ func (hc *httpClient) Send(requestURL string, method string, header map[string]s
|
|||||||
default:
|
default:
|
||||||
return nil, errors.New(method + " is not invalid")
|
return nil, errors.New(method + " is not invalid")
|
||||||
}
|
}
|
||||||
if response, err = c.Do(method, requestURL, header, bytes.NewReader(byteData)); nil != err {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if response.StatusCode != http.StatusOK {
|
if response.StatusCode != http.StatusOK {
|
||||||
return nil, fmt.Errorf("%v : %v", response.StatusCode, response.Status)
|
return nil, fmt.Errorf("%v : %v", response.StatusCode, response.Status)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user