Compare commits
3 Commits
0.0.1-alph
...
2-create-f
| Author | SHA1 | Date | |
|---|---|---|---|
| 82702848f9 | |||
| b079790183 | |||
| bab50ebfc4 |
@@ -213,8 +213,12 @@ 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