summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/client.go b/client.go
index 145b2f8..26fed10 100644
--- a/client.go
+++ b/client.go
@@ -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") != ""
}