Function Compute supports HTTP triggers. Functions that have HTTP triggers configured can be triggered for execution by HTTP requests. At this point, the function can be considered like a web server, which receives HTTP requests and returns the processing results to the client.
After binding HTTP triggers, you can access the functions through the default addresses
<account_id>.<region>.fc.aliyuncs.com/<version>/proxy/<serviceName>/<functionName>/[action?queries] provided by Function Compute. If you want to access the functions through custom domain names, bind the custom domain names in Function Compute. This tutorial describes how to bind the custom domain names.
Building web servers that are based on HTTP triggers. This tutorial uses functions f1 and f2 as examples. These functions only print out the requests as are.
Execution of functions can be triggered by accessing them with custom domain names.
The ICP registration of your domain name has already been transferred to Alibaba Cloud. Alternatively, you have obtained or reregistered the ICP registration for the domain names through Alibaba Cloud. For more information about ICP registration, see ICP registration guide.
This tutorial contains the following steps:
- Build web servers based on HTTP triggers.
- Resolve domain names.
- Bind custom domain names in Function Compute.
- Test functions.
- Send requests through custom domain names to trigger executions of functions and check the results.
For more information about custom domain names, see Binding custom domain name.