aboutsummaryrefslogtreecommitdiff
path: root/mastodon/apps.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/apps.go
parent60ccc9686a39ff67d3cf361c4e6848d79877b18b (diff)
downloadbloat-ad38855261dca802439922f71408e2b08e7c10ea.tar.gz
bloat-ad38855261dca802439922f71408e2b08e7c10ea.zip
Set timeout and response size limit for the http client
Diffstat (limited to 'mastodon/apps.go')
-rw-r--r--mastodon/apps.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/mastodon/apps.go b/mastodon/apps.go
index 5d925c3..12d2e86 100644
--- a/mastodon/apps.go
+++ b/mastodon/apps.go
@@ -11,7 +11,6 @@ import (
// AppConfig is a setting for registering applications.
type AppConfig struct {
- http.Client
Server string
ClientName string
@@ -62,7 +61,7 @@ func RegisterApp(ctx context.Context, appConfig *AppConfig) (*Application, error
}
req = req.WithContext(ctx)
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
- resp, err := appConfig.Do(req)
+ resp, err := httpClient.Do(req)
if err != nil {
return nil, err
}