diff --git a/tools/remote_caller.go b/tools/remote_caller.go index 4d05476..8480f62 100644 --- a/tools/remote_caller.go +++ b/tools/remote_caller.go @@ -53,8 +53,16 @@ func NewHTTPCaller(urls map[DataType]map[METHOD]string) *HTTPCaller { } // CallGet calls the GET method on the HTTP server -func (caller *HTTPCaller) CallGet(url string, subpath string) ([]byte, error) { - resp, err := http.Get(url + subpath) +func (caller *HTTPCaller) CallGet(url string, subpath string, types ...string) ([]byte, error) { + req, err := http.NewRequest(http.MethodGet, url+subpath, bytes.NewBuffer([]byte(""))) + if err != nil { + return nil, err + } + for _, t := range types { + req.Header.Set("Content-Type", t) + } + client := &http.Client{} + resp, err := client.Do(req) if err != nil { return nil, err }