mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-11-01 04:24:19 +00:00
utils: dont set http.Client timeout to a default value
This commit is contained in:
parent
67f94a835a
commit
6f5a53063f
|
@ -5,7 +5,6 @@ import (
|
|||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"time"
|
||||
)
|
||||
|
||||
// DefaultClient implements Client and wraps around the stdlib Client.
|
||||
|
@ -19,12 +18,9 @@ func WrapClient(client http.Client) Client {
|
|||
return DefaultClient(client)
|
||||
}
|
||||
|
||||
// NewClient creates a new client around the standard library's http.Client. The
|
||||
// client will have a timeout of 10 seconds.
|
||||
// NewClient creates a new client around the standard library's http.Client.
|
||||
func NewClient() Client {
|
||||
return WrapClient(http.Client{
|
||||
Timeout: 10 * time.Second,
|
||||
})
|
||||
return WrapClient(http.Client{})
|
||||
}
|
||||
|
||||
func (d DefaultClient) NewRequest(ctx context.Context, method, url string) (Request, error) {
|
||||
|
|
Loading…
Reference in a new issue