diff --git a/ovrstat.go b/ovrstat.go index 998bb02..13477ed 100644 --- a/ovrstat.go +++ b/ovrstat.go @@ -6,6 +6,7 @@ import ( "net/http" "fmt" "net/url" + "time" ) type OvrStatApi struct { @@ -20,7 +21,7 @@ func New(apiUrl string) *OvrStatApi { return nil } - return &OvrStatApi{Client: &http.Client{}, URL: u} + return &OvrStatApi{Client: &http.Client{Timeout: 10 * time.Second}, URL: u} } func (s *OvrStatApi) FetchProfile(platform, region, battletag string) (*OwApiResponse, error) {