fix url building
parent
84fe20aea4
commit
508da7f9cb
2
lib.go
2
lib.go
|
@ -34,7 +34,7 @@ func (c *Cli) Do(method string, strurl string, body []byte) (*http.Response, err
|
||||||
if strings.HasSuffix(addr, "/") {
|
if strings.HasSuffix(addr, "/") {
|
||||||
addr = addr[:len(addr)-1]
|
addr = addr[:len(addr)-1]
|
||||||
}
|
}
|
||||||
if !strings.HasPrefix(strurl, "") {
|
if !strings.HasPrefix(strurl, "/") {
|
||||||
strurl = "/" + strurl
|
strurl = "/" + strurl
|
||||||
}
|
}
|
||||||
strurl = addr + strurl
|
strurl = addr + strurl
|
||||||
|
|
Loading…
Reference in New Issue