ProtectedconstructorCreate an Adapter.
The blueprint to create the adapter.
Protected ReadonlyblueprintProtected ReadonlyhooksProtected ReadonlymiddlewareProtected ReadonlyresolvedProtectedbuildBuild the raw response.
The event context.
OptionaleventHandler: AdapterEventHandlerType<IncomingHttpEvent, OutgoingHttpResponse>
The event handler to be run.
The raw response wrapper.
ProtectedeventHandle a single FC HTTP request, writing the response onto resp.
The incoming FC request.
The imperative FC response object.
The FC invocation context.
The FC response object.
ProtectedexecuteExecute the event handler lifecycle hooks.
The hook to execute.
The event handler to be run.
ProtectedexecuteExecute adapter lifecycle hooks.
The hook's name.
Optionalcontext: AlibabaFcHttpAdapterContext
The event context.
Optionalerror: any
The error to handle.
ProtectedhandleHandle error.
The error to handle.
The event context.
The raw response.
ProtectedhandleHandle the event.
The event context.
The event handler to be run.
The raw response wrapper.
ProtectedmakeCreate pipeline options for the Adapter.
The pipeline options for transforming the event.
ProtectedonLifecycle hook run once before the first request.
ProtectedresolveGet the error handler for the given error.
The error to get the handler for.
The error handler.
ProtectedresolveStart the adapter and return the FC HTTP handler (req, resp, context).
The FC HTTP handler.
ProtectedsendSend the raw event through the destination.
The event context.
The event handler to be run.
Platform-specific response.
ProtectedvalidateValidate the context and event handler.
The context to validate.
The event handler to validate.
StaticcreateThe application blueprint.
A new adapter instance.
Alibaba Cloud Function Compute HTTP adapter for Stone.js.
FC's HTTP trigger (2.0) invokes the function with
(req, resp, context): a plain request object (body pre-read into aBuffer) and an imperative response written viasetStatusCode/setHeader/send.run()does not start a server — it returns that handler, and the adapter normalizes the request into anIncomingHttpEvent, runs the kernel, and writes the response.Remarks
FC 3.0 runs a container with a normal HTTP server, so it does not need this adapter, use
@stone-js/node-http-adapterthere as-is.Example