diff options
Diffstat (limited to 'client.go')
-rw-r--r-- | client.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -123,7 +123,8 @@ type httpClient struct { } func (hc httpClient) RoundTrip(request *Request) (*Response, error) { - hreq, err := http.NewRequest("GET", request.URL.String(), request.Meta.(*io.LimitedReader)) + body, _ := request.Meta.(io.Reader) + hreq, err := http.NewRequest("GET", request.URL.String(), body) if err != nil { return nil, err } @@ -141,5 +142,5 @@ func (hc httpClient) RoundTrip(request *Request) (*Response, error) { } func (hc httpClient) IsRedirect(response *Response) bool { - return response.Meta.(*http.Request).Header.Get("Location") != "" + return response.Meta.(*http.Response).Header.Get("Location") != "" } |