diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-12-17 06:11:18 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-12-17 06:11:18 -0800 |
commit | 432652e9d1dc668526bdd57ddf0c6060659c65d1 (patch) | |
tree | a340f5f4de781de96fadabcd37e07ed3017e3b8d /system/api/server.go | |
parent | 7194cca8b7a73c835bb0d1acb5bbc8af9d96a10d (diff) |
testing API based reference
Diffstat (limited to 'system/api/server.go')
-rw-r--r-- | system/api/server.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/system/api/server.go b/system/api/server.go index 7254a7b..c6d29bf 100644 --- a/system/api/server.go +++ b/system/api/server.go @@ -19,13 +19,13 @@ func Run() { } // ContentAll retrives all items from the HTTP API within the provided namespace -func ContentAll(namespace string) [][]bytes { +func ContentAll(namespace string) [][]byte { endpoint := "http://0.0.0.0:8080/api/contents?type=" buf := []byte{} r := bytes.NewReader(buf) req, err := http.NewRequest(http.MethodGet, endpoint+namespace, r) if err != nil { - log.Println("Error creating request for reference from:", contentType) + log.Println("Error creating request for reference from:", namespace) return nil } @@ -34,5 +34,6 @@ func ContentAll(namespace string) [][]bytes { fmt.Println(res, string(buf)) - return []byte{buf} + ret := [][]byte{} + return append(ret, buf) } |