diff options
Diffstat (limited to 'client.go')
-rw-r--r-- | client.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -31,7 +31,7 @@ type Client struct { const DefaultMaxRedirects int = 5 -var ExceededMaxRedirects = errors.New("Client: exceeded MaxRedirects") +var ErrExceededMaxRedirects = errors.New("Client: exceeded MaxRedirects") // NewClient builds a Client object. // @@ -96,7 +96,7 @@ func (c Client) Fetch(ctx context.Context, url string) (*Response, error) { } } - return nil, ExceededMaxRedirects + return nil, ErrExceededMaxRedirects } // Upload sends a request with a body and returns any redirect response. @@ -130,7 +130,7 @@ type httpClient struct { func (hc httpClient) RoundTrip(ctx context.Context, request *Request) (*Response, error) { body, _ := request.Meta.(io.Reader) - hreq, err := http.NewRequestWithContext(ctx, "GET", request.URL.String(), body) + hreq, err := http.NewRequestWithContext(ctx, "GET", request.String(), body) if err != nil { return nil, err } |