diff options
author | 2025-01-27 15:54:59 +0000 | |
---|---|---|
committer | 2025-01-27 15:54:59 +0000 | |
commit | 726d2ba483b58402fa5e8d5a99d5cbd290bdeb67 (patch) | |
tree | ec597aa14d4c5cd8f36661750ff71a3ffbc2eb2d /internal/httpclient/client.go | |
parent | bumps uptrace/bun deps to v1.2.8 (#3698) (diff) | |
download | gotosocial-726d2ba483b58402fa5e8d5a99d5cbd290bdeb67.tar.xz |
[chore] some tidy ups (#3677)
* small formatting changes (no logic)
* improve code comments
* fix import cycle
* shutup stinky linter
Diffstat (limited to 'internal/httpclient/client.go')
-rw-r--r-- | internal/httpclient/client.go | 3 |
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) { |