DaanHoogland commented on code in PR #140: URL: https://github.com/apache/cloudstack-cloudmonkey/pull/140#discussion_r1380289018
########## cmd/network.go: ########## @@ -243,9 +252,18 @@ func NewAPIRequest(r *Request, api string, args []string, isAsync bool) (map[str params.Add("sessionkey", sessionKey) requestURL = fmt.Sprintf("%s?%s", r.Config.ActiveProfile.URL, encodeRequestParams(params)) config.Debug("NewAPIRequest API request URL:", requestURL) - response, err = r.Client().Get(requestURL) - if err != nil { - return nil, err + + if params.Has("password") || params.Has("userdata") { + requestURL = fmt.Sprintf("%s", r.Config.ActiveProfile.URL) + response, err = r.Client().PostForm(requestURL, params) + if err != nil { + return nil, err + } + } else { + response, err = r.Client().Get(requestURL) + if err != nil { + return nil, err + } } Review Comment: this change is done twice. time for a method to call in both places? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org