This commit is contained in:
holooooo
2021-05-25 10:10:06 +08:00
parent a7acd11131
commit 2182081831
4 changed files with 17 additions and 17 deletions

View File

@@ -91,14 +91,14 @@ func (c *Client) handleResponse(value interface{}, req *BeegoHTTPRequest) error
// handleCarrier set http data to value
func (c *Client) handleCarrier(value interface{}, req *BeegoHTTPRequest) error {
resp, err := req.Response()
defer resp.Body.Close()
if err != nil {
return err
}
defer resp.Body.Close()
if value == nil {
return err
}
if carrier, ok := value.(HTTPResponseCarrier); ok {
b, err := req.Bytes()
if err != nil {