Functions with this annotation can be invoked through a URL template with the following parameters.
https://{APIHOST}/api/v1/web/{USER_NAMESPACE}/{PACKAGE}/{ACTION_NAME}.{TYPE}
APIHOST - platform endpoint e.g. openwhisk.ng.bluemix.net.
USER_NAMESPACE - this must be an explicit namespace and cannot use the default namespace (_).
PACKAGE - action package or default.
ACTION_NAME - default form ${servicename}-${space}-${name}.
TYPE - .json, .html, .text or .http.
Return values from the function are used to construct the HTTP response. The following parameters are supported.
headers: a JSON object where the keys are header-names and the values are string values for those headers (default is no headers).
code: a valid HTTP status code (default is 200 OK).
body: a string which is either plain text or a base64 encoded string (for binary data).
For background see: https://serverless.com/framework/docs/providers/openwhisk/guide/web-actions/
functions: my_function: handler: index.main annotations: web-export: true
Functions with this annotation can be invoked through a URL template with the following parameters.
Return values from the function are used to construct the HTTP response. The following parameters are supported.
headers
: a JSON object where the keys are header-names and the values are string values for those headers (default is no headers).code
: a valid HTTP status code (default is 200 OK).body
: a string which is either plain text or a base64 encoded string (for binary data).