summaryrefslogtreecommitdiff
path: root/system/addon/api.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-12-18 17:57:07 -0800
committerSteve Manuel <nilslice@gmail.com>2016-12-18 17:57:07 -0800
commite45ac283ee4c6fceca0724dc0a8c118621643279 (patch)
treed53642fe3b3d1910ab5388e5cfdc1d22169b8248 /system/addon/api.go
parent5495e347ba5563397734168fffc04791a20064d2 (diff)
debugging host port issue in config
Diffstat (limited to 'system/addon/api.go')
-rw-r--r--system/addon/api.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/system/addon/api.go b/system/addon/api.go
index 1ca260b..7df31ef 100644
--- a/system/addon/api.go
+++ b/system/addon/api.go
@@ -20,6 +20,7 @@ func ContentAll(namespace string) []byte {
buf := []byte{}
r := bytes.NewReader(buf)
url := fmt.Sprintf(endpoint, host, port, namespace)
+ fmt.Println(url)
req, err := http.NewRequest(http.MethodGet, url, r)
if err != nil {
@@ -31,6 +32,10 @@ func ContentAll(namespace string) []byte {
Timeout: time.Duration(time.Second * 5),
}
res, err := c.Do(req)
+ if err != nil {
+ log.Println("Error making HTTP request for reference of:", namespace)
+ return nil
+ }
defer res.Body.Close()
j, err := ioutil.ReadAll(res.Body)