From 6eb213a5455557999f8712f2a18d1a59964f1761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Abdelkader=20Mart=C3=ADnez=20P=C3=A9rez?= Date: Thu, 3 Oct 2019 20:57:40 +0200 Subject: [PATCH] Adjust set and get to send no Content-Type --- internal/client/get.go | 2 +- internal/client/set.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/client/get.go b/internal/client/get.go index 9396a8a..96ac89b 100644 --- a/internal/client/get.go +++ b/internal/client/get.go @@ -9,5 +9,5 @@ import ( //GetData will perform the request and write the results on the provided writer func GetData(host, id, path string, wr io.Writer) error { url := host + "/handlers/" + id + path - return http.Get(url, nil, wr) + return http.Get(url, "", nil, wr) } diff --git a/internal/client/set.go b/internal/client/set.go index f10fda1..fba3d5d 100644 --- a/internal/client/set.go +++ b/internal/client/set.go @@ -10,6 +10,6 @@ import ( // TODO: Review spec: Data API > Error responses > 204 Resource Item Not Found should not be 2xx func SetData(kapowURL, handlerId, path string, r io.Reader) error { - return http.Put(fmt.Sprintf("%s/%s%s", kapowURL, handlerId, path), r, nil) + return http.Put(fmt.Sprintf("%s/%s%s", kapowURL, handlerId, path), "", r, nil) }