Merge pull request #123 from c4milo/shared-http-client

feat(util/http_client): Adds generic HTTP client
This commit is contained in:
Brandon Philips
2014-05-22 14:37:32 -07:00
10 changed files with 163 additions and 129 deletions

View File

@@ -5,6 +5,8 @@ import (
"io/ioutil"
"log"
"strings"
"github.com/coreos/coreos-cloudinit/pkg"
)
const (
@@ -32,7 +34,8 @@ func (self *procCmdline) Fetch() ([]byte, error) {
return nil, err
}
cfg, err := fetchURL(url)
client := pkg.NewHttpClient()
cfg, err := client.Get(url)
if err != nil {
return nil, err
}