summaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'client.go')
-rw-r--r--client.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/client.go b/client.go
index f3ec6a5..36b2ce9 100644
--- a/client.go
+++ b/client.go
@@ -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
}