@violentmonkey/types
    Preparing search index...

    Interface GMRequestBase<T>

    interface GMRequestBase<T> {
        anonymous?: boolean;
        context?: unknown;
        headers?: Record<string, string>;
        onabort?: (resp: VMScriptResponseObject<T>) => void;
        onerror?: (resp: VMScriptResponseObject<T>) => void;
        onload?: (resp: VMScriptResponseObject<T>) => void;
        onloadend?: (resp: VMScriptResponseObject<T>) => void;
        onloadstart?: (resp: VMScriptResponseObject<T>) => void;
        onprogress?: (resp: VMScriptResponseObject<T>) => void;
        onreadystatechange?: (resp: VMScriptResponseObject<T>) => void;
        ontimeout?: (resp: VMScriptResponseObject<T>) => void;
        password?: string;
        timeout?: number;
        url: string;
        user?: string;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index
    anonymous?: boolean

    When set to true, no cookie will be sent with the request and the response cookies will be ignored. The default value is false.

    context?: unknown

    Can be an object and will be assigned to context of the response object.

    headers?: Record<string, string>

    Some special headers are also allowed:

    • Cookie
    • Host
    • Origin
    • Referer
    • User-Agent
    onabort?: (resp: VMScriptResponseObject<T>) => void
    onerror?: (resp: VMScriptResponseObject<T>) => void
    onload?: (resp: VMScriptResponseObject<T>) => void
    onloadend?: (resp: VMScriptResponseObject<T>) => void
    onloadstart?: (resp: VMScriptResponseObject<T>) => void
    onprogress?: (resp: VMScriptResponseObject<T>) => void
    onreadystatechange?: (resp: VMScriptResponseObject<T>) => void
    ontimeout?: (resp: VMScriptResponseObject<T>) => void
    password?: string

    Password for authentication.

    timeout?: number

    Time to wait for the request, none by default.

    url: string

    URL relative to current page is also allowed.

    user?: string

    User for authentication.