Stone.js API
    Preparing search index...

    The Alibaba Cloud Function Compute HTTP response (FC 2.0 imperative response object).

    Unlike a Web Response, the FC response is written imperatively: set the status and headers, then send() the body once. Duck-typed to the methods the wrapper calls.

    interface AlibabaFcHttpResponse {
        deleteHeader?: (key: string) => void;
        send: (body?: string | Buffer<ArrayBufferLike>) => void;
        setHeader: (key: string, value: string | string[]) => void;
        setStatusCode: (statusCode: number) => void;
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown

      Extra FC-specific members.

    Index
    deleteHeader?: (key: string) => void

    Removes a response header.

    send: (body?: string | Buffer<ArrayBufferLike>) => void

    Writes the body and completes the response.

    setHeader: (key: string, value: string | string[]) => void

    Sets a response header (FC accepts an array for multi-value headers like Set-Cookie).

    setStatusCode: (statusCode: number) => void

    Sets the HTTP status code.