Hosanna UI API v1.30.2-next
    Preparing search index...

    Options for configuring an HsFetch request.

    interface HsFetchOptions {
        body?: string;
        contextData?: JsonData;
        credentials?: "include" | "same-origin";
        forceText?: boolean;
        headers?: Record<string, string>;
        maxMs?: number;
        method?: http_commands_api.HttpMethod;
        postProcessFunction?: (response: IHsFetchResponse) => void;
        retainBodyError?: boolean;
    }
    Index

    Properties

    body?: string

    The body of the request, as a string.

    contextData?: JsonData

    Optional context data. Passed through with the request; the HTTP command handler attaches it as response.contextData before invoking postProcessFunction. Use for caller-defined context (e.g. row id, request key).

    credentials?: "include" | "same-origin"

    Credentials mode for the request (e.g., 'include' or 'same-origin').

    forceText?: boolean
    headers?: Record<string, string>

    Headers to include in the request.

    maxMs?: number

    The HTTP method to use for the request (e.g., GET, POST).

    postProcessFunction?: (response: IHsFetchResponse) => void

    Optional post-processing function. This option is not used by HsFetch; it is passed through in the request options and consumed by the HTTP command handler (e.g. HttpCommands), which invokes it with the response after the request completes.

    When used with the HTTP handler: the function must be an exported function (not inline or anonymous), as AsyncFunctionPointer is serialized by name for platforms like Roku/BrightScript. Signature: (response: IHsFetchResponse). When contextData is provided, the handler sets response.contextData before calling the function.

    retainBodyError?: boolean

    Whether to retain the response body on error.