You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/09/19 15:19:00 UTC

[GitHub] dubeejw commented on a change in pull request #2748: Don't assume apihost is https for sdk and action urls

dubeejw commented on a change in pull request #2748: Don't assume apihost is https for sdk and action urls
URL: https://github.com/apache/incubator-openwhisk/pull/2748#discussion_r139723934
 
 

 ##########
 File path: tools/cli/go-whisk/whisk/action.go
 ##########
 @@ -122,33 +122,39 @@ func (action Action) WebAction() (webExportValue bool) {
 Returns the URL of an action as a string. A valid API host, path and version must be passed. A package that contains the
 action must be passed as well. An empty string must be passed if the action is not packaged.
  */
-func (action Action) ActionURL(apiHost string, apiPath string, apiVersion string, pkg string) (actionURL string) {
-    webActionPath := "https://%s%s/%s/web/%s/%s/%s"
-    actionPath := "https://%s%s/%s/namespaces/%s/actions/%s"
+func (action Action) ActionURL(apiHost string, apiPath string, apiVersion string, pkg string) (string, error) {
+    baseURL, err := GetURLBase(apiHost, apiPath)
+    if err != nil {
+        Debug(DbgError, "getURLBase(%s, %s) failed: %s\n", apiHost, apiPath, err)
 
 Review comment:
   Wrong debug message here. `getURLBase` should be `GetURLBase`.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services