summaryrefslogtreecommitdiff
path: root/internal/httpclient/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/httpclient/client.go')
-rw-r--r--internal/httpclient/client.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/httpclient/client.go b/internal/httpclient/client.go
index 10fba5d42..445c6a9e5 100644
--- a/internal/httpclient/client.go
+++ b/internal/httpclient/client.go
@@ -178,6 +178,9 @@ func New(cfg Config) *Client {
return &c
}
+// RoundTrip allows httpclient.Client{} to be used as an http.Transport{}, just calling Client{}.Do().
+func (c *Client) RoundTrip(r *http.Request) (rsp *http.Response, err error) { return c.Do(r) }
+
// Do will essentially perform http.Client{}.Do() with retry-backoff functionality.
func (c *Client) Do(r *http.Request) (rsp *http.Response, err error) {