Skip to content

Commit

Permalink
[FIX] client request url fix (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-yudovich authored Sep 28, 2022
1 parent 6f624bd commit b13531e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cf/cfclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,14 @@ func DefaultConfig() *Config {

// NewRequest is used to create a new Request
func (c *Client) NewRequest(method, path string) *Request {
requestUrl := path
if !strings.HasPrefix(path, "http") {
requestUrl = c.Config.ApiAddress + path
}

r := &Request{
method: method,
url: c.Config.ApiAddress + path,
url: requestUrl,
params: make(map[string][]string),
}
return r
Expand Down

0 comments on commit b13531e

Please sign in to comment.