Compare commits
4 Commits
2-create-f
...
0.0.1-alph
| Author | SHA1 | Date | |
|---|---|---|---|
| 8035772f71 | |||
| 6f78447552 | |||
| 4786c4dd6a | |||
| 27d358911a |
@@ -213,12 +213,8 @@ func (c *Client) do(ctx context.Context, method, relativeURL string, reqBody int
|
|||||||
return fmt.Errorf("unable to parse URL: %s %s %w", method, relativeURL, err)
|
return fmt.Errorf("unable to parse URL: %s %s %w", method, relativeURL, err)
|
||||||
}
|
}
|
||||||
if !strings.HasPrefix(relativeURL, "/") && !reqURL.IsAbs() {
|
if !strings.HasPrefix(relativeURL, "/") && !reqURL.IsAbs() {
|
||||||
if strings.Contains(relativeURL, "firewall/zone") {
|
|
||||||
reqURL.Path = path.Join(c.apiV2Path, reqURL.Path)
|
|
||||||
} else {
|
|
||||||
reqURL.Path = path.Join(c.apiPath, reqURL.Path)
|
reqURL.Path = path.Join(c.apiPath, reqURL.Path)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
url := c.baseURL.ResolveReference(reqURL)
|
url := c.baseURL.ResolveReference(reqURL)
|
||||||
req, err := http.NewRequestWithContext(ctx, method, url.String(), reqReader)
|
req, err := http.NewRequestWithContext(ctx, method, url.String(), reqReader)
|
||||||
|
|||||||
Reference in New Issue
Block a user