package option

import (
	"net/http"
	"time"

	"github.com/itchio/wharf/timeout"
)

type EOSSettings struct {
	HTTPClient *http.Client
}

func DefaultSettings() *EOSSettings {
	return &EOSSettings{
		HTTPClient: defaultHTTPClient(),
	}
}

func defaultHTTPClient() *http.Client {
	client := timeout.NewClient(time.Second*time.Duration(5), time.Second*time.Duration(5))
	return client
}

//////////////////////////////////////

type Option interface {
	Apply(*EOSSettings)
}

package option

import "net/http"

type EOSSettings struct {
	HTTPClient *http.Client
}

func DefaultSettings() *EOSSettings {
	return &EOSSettings{
		HTTPClient: http.DefaultClient,
	}
}

//////////////////////////////////////

type Option interface {
	Apply(*EOSSettings)
}

--- 
+++ 
@@ -1,6 +1,11 @@
 package option
 
-import "net/http"
+import (
+	"net/http"
+	"time"
+
+	"github.com/itchio/wharf/timeout"
+)
 
 type EOSSettings struct {
 	HTTPClient *http.Client
@@ -8,8 +13,13 @@
 
 func DefaultSettings() *EOSSettings {
 	return &EOSSettings{
-		HTTPClient: http.DefaultClient,
+		HTTPClient: defaultHTTPClient(),
 	}
+}
+
+func defaultHTTPClient() *http.Client {
+	client := timeout.NewClient(time.Second*time.Duration(5), time.Second*time.Duration(5))
+	return client
 }
 
 //////////////////////////////////////
Use a timeout client for eos
