diff --git a/netbox.go b/netbox.go index 2aa59c5..c9a2eca 100644 --- a/netbox.go +++ b/netbox.go @@ -199,7 +199,7 @@ func (c *Client) FetchSessionKey(privatekey string) error { query := form.Encode() ctx := context.Background() - req, err := http.NewRequestWithContext(ctx, "POST", secretsPath+"/get-session-key/", strings.NewReader(query)) + req, err := http.NewRequestWithContext(ctx, "POST", c.baseURL.String()+secretsPath+"/get-session-key/", strings.NewReader(query)) if err != nil { return err }