Merge pull request #296 from hashicorp/remove-defaultclient

Remove usage of http.DefaultClient
This commit is contained in:
Chris Bednarski
2015-10-16 13:57:36 -07:00
2 changed files with 2 additions and 3 deletions

View File

@@ -86,7 +86,7 @@ type Config struct {
func DefaultConfig() *Config {
config := &Config{
Address: "http://127.0.0.1:4646",
HttpClient: http.DefaultClient,
HttpClient: &http.Client{},
}
if addr := os.Getenv("NOMAD_ADDR"); addr != "" {
config.Address = addr

View File

@@ -156,8 +156,7 @@ func NewTestServer(t *testing.T, cb ServerConfigCallback) *TestServer {
t.Fatalf("err: %s", err)
}
var client *http.Client
client = http.DefaultClient
client := &http.Client{}
server := &TestServer{
Config: nomadConfig,