Auto Task API
    Preparing search index...
    interface GMRequestOptions {
        anonymous?: boolean;
        data?: string | FormData;
        headers?: Record<string, string>;
        method?: "GET" | "POST";
        onabort: (response?: unknown) => void;
        onerror: (response?: unknown) => void;
        onload: (response: GMRawResponse) => void;
        ontimeout: (response?: unknown) => void;
        redirect?: "follow" | "manual";
        responseType?: "json";
        timeout?: number;
        url: string;
    }

    Hierarchy

    Index
    anonymous?: boolean
    data?: string | FormData
    headers?: Record<string, string>
    method?: "GET" | "POST"
    onabort: (response?: unknown) => void

    处理请求中止事件。

    Type Declaration

      • (response?: unknown): void
      • Parameters

        • Optionalresponse: unknown

          请求响应数据;可省略。

        Returns void

    onerror: (response?: unknown) => void

    处理请求失败事件。

    Type Declaration

      • (response?: unknown): void
      • Parameters

        • Optionalresponse: unknown

          请求响应数据;可省略。

        Returns void

    onload: (response: GMRawResponse) => void

    处理请求加载完成事件。

    Type Declaration

    ontimeout: (response?: unknown) => void

    处理请求超时事件。

    Type Declaration

      • (response?: unknown): void
      • Parameters

        • Optionalresponse: unknown

          请求响应数据;可省略。

        Returns void

    redirect?: "follow" | "manual"
    responseType?: "json"

    GM's text mode is selected by omitting responseType.

    timeout?: number
    url: string