magicshui/goutils — pull request #2 by lowstz (2014-12-02 08:44:56+00:00)
Title: fix-http-response-resource-leak

1. The defer close resource style use [net/http](http://golang.org/pkg/net/http/) package documennt style
The client must close the response body when finished with it:
``` go
resp, err := http.Get("http://example.com/")
if err != nil {
// handle error
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
// ...
```

2. Fix function `GetHttpsRequest` and `GetRequest` responese resource leak.
Please test the code

BTW: the unit test in `goutil/requests/requests_test.go` is break, two functions both return response.Body, but the unit test check the response.StatusCode.