Executing Cloud Functions Programmatically

Executing Cloud Functions Programmatically

If you want to execute a Cloud Function from code, you need to make an HTTP request to its specific endpoint URL. This URL is generated like this:

  • app-id—the App ID of your app
  • function-name—the name of the cloud function you want to execute
  • parameter1=value1&parameter2=value2&...parameterN=valueN—optional URL parameters passed to the cloud function

When making the HTTP request, you can use any HTTP method you need—GET, POST, DELETE, and so on. The result will be the same unless your Cloud Function implements branching depending on the HTTP method.

With the HTTP request, you can include any headers that you need. The headers, along with the HTTP request body, are available to your Cloud Function during execution and are a handy way to send parameters. Do not forget to set the Content-Type header properly if you are using the request body to send data. Accessing URL parameters and header data is described in Defining Cloud Functions.

See Also

Start a free trial Request a demo
Contact us: +1-888-365-2779
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.