From 726d2ba483b58402fa5e8d5a99d5cbd290bdeb67 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Mon, 27 Jan 2025 15:54:59 +0000 Subject: [chore] some tidy ups (#3677) * small formatting changes (no logic) * improve code comments * fix import cycle * shutup stinky linter --- internal/httpclient/client.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/httpclient/client.go') 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) { -- cgit v1.2.3