Do HTTP requests support asynchronous invocations? How do I obtain the invocation results?

更新时间:
复制 MD 格式

Yes. Add the X-Fc-Invocation-Type: Async request header to your HTTP request. Function Compute queues the invocation and the function runs in the background without blocking the caller.

For example, using curl:

curl -X POST https://<your-fc-endpoint> \
  -H "X-Fc-Invocation-Type: Async" \
  -H "Content-Type: application/json" \
  -d '{"key": "value"}'

For full details on HTTP trigger configuration, see HTTP triggers overview.

Get invocation results

Asynchronous invocations do not return function output inline. To receive the result, configure an asynchronous destination — Function Compute pushes the invocation record to the destination after execution completes.

For setup instructions, see Result callback.