From 48262849df1bfcc3319d902056afe50199eb7365 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Mon, 4 Mar 2024 15:23:46 +0000 Subject: [PATCH] lib/rest: Add Client.Do function to call http.Client.Do --- lib/rest/rest.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/rest/rest.go b/lib/rest/rest.go index 61522577d..627f0585c 100644 --- a/lib/rest/rest.go +++ b/lib/rest/rest.go @@ -211,6 +211,11 @@ func ClientWithNoRedirects(c *http.Client) *http.Client { return &clientCopy } +// Do calls the internal http.Client.Do method +func (api *Client) Do(req *http.Request) (*http.Response, error) { + return api.c.Do(req) +} + // Call makes the call and returns the http.Response // // if err == nil then resp.Body will need to be closed unless