From 5986d73367703278279fb7fe361d0789c88b9405 Mon Sep 17 00:00:00 2001 From: mr Date: Mon, 12 Aug 2024 16:21:38 +0200 Subject: [PATCH] implement remote call for remote action --- tools/remote_caller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/remote_caller.go b/tools/remote_caller.go index 12622af..e12184b 100644 --- a/tools/remote_caller.go +++ b/tools/remote_caller.go @@ -24,7 +24,7 @@ func NewHTTPCaller(url string, origin string, originSubPath string, destSubPath } func (caller *HTTPCaller) CallGet(url string, subpath string) ([]byte, error) { - resp, err := http.Get(url + "/" + subpath) + resp, err := http.Get(url + subpath) if err != nil { return nil, err } @@ -35,7 +35,7 @@ func (caller *HTTPCaller) CallGet(url string, subpath string) ([]byte, error) { func (caller *HTTPCaller) CallPost(url string, subpath string, body map[string]interface{}) ([]byte, error) { postBody, _ := json.Marshal(body) responseBody := bytes.NewBuffer(postBody) - resp, err := http.Post(url+"/"+subpath, "application/json", responseBody) + resp, err := http.Post(url+subpath, "application/json", responseBody) if err != nil { return nil, err }