aboutsummaryrefslogtreecommitdiff
path: root/mastodon/mastodon.go
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2023-09-17 09:44:02 +0000
committerr <r@freesoftwareextremist.com>2023-09-18 04:05:20 +0000
commitad38855261dca802439922f71408e2b08e7c10ea (patch)
treef87bb943c2285ea3ae32ecd3b0d2495ea97af5b8 /mastodon/mastodon.go
parent60ccc9686a39ff67d3cf361c4e6848d79877b18b (diff)
downloadbloat-ad38855261dca802439922f71408e2b08e7c10ea.tar.gz
bloat-ad38855261dca802439922f71408e2b08e7c10ea.zip
Set timeout and response size limit for the http client
Diffstat (limited to 'mastodon/mastodon.go')
-rw-r--r--mastodon/mastodon.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/mastodon/mastodon.go b/mastodon/mastodon.go
index 8678314..f114169 100644
--- a/mastodon/mastodon.go
+++ b/mastodon/mastodon.go
@@ -168,12 +168,13 @@ func (c *Client) doAPI(ctx context.Context, method string, uri string, params in
}
}
return json.NewDecoder(resp.Body).Decode(&res)
+
}
// NewClient return new mastodon API client.
func NewClient(config *Config) *Client {
return &Client{
- Client: http.DefaultClient,
+ Client: httpClient,
config: config,
}
}