Trim server url in client init

This commit is contained in:
Soam Vasani
2016-11-01 18:11:21 -07:00
parent e49f165ba2
commit 8b8e8c6539
+2 -1
View File
@@ -24,6 +24,7 @@ import (
"fmt"
"io/ioutil"
"net/http"
"strings"
log "github.com/Sirupsen/logrus"
@@ -37,7 +38,7 @@ type (
)
func MakeClient(serverUrl string) *Client {
return &Client{Url: serverUrl}
return &Client{Url: strings.TrimSuffix(serverUrl, "/")}
}
func (c *Client) delete(relativeUrl string) error {