fix url building

master
Paulo Simão 2021-10-09 10:38:14 -03:00
parent 84fe20aea4
commit 508da7f9cb
1 changed files with 1 additions and 1 deletions

2
lib.go
View File

@ -34,7 +34,7 @@ func (c *Cli) Do(method string, strurl string, body []byte) (*http.Response, err
if strings.HasSuffix(addr, "/") {
addr = addr[:len(addr)-1]
}
if !strings.HasPrefix(strurl, "") {
if !strings.HasPrefix(strurl, "/") {
strurl = "/" + strurl
}
strurl = addr + strurl