@japofc/baileys - v2.4.7
    Preparing search index...

    Interface UrlWatcherOptions

    URL watcher — poll an endpoint, get notified when its content changes.

    interface UrlWatcherOptions {
        extract?: (body: string) => unknown;
        fetchImpl?: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | URL | Request, init?: RequestInit): Promise<Response>;
        };
        headers?: Record<string, string>;
        intervalMs?: number;
        timeoutMs?: number;
    }
    Index
    extract?: (body: string) => unknown

    Reduce the body before hashing/reporting (e.g. one JSON field).

    fetchImpl?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    }

    fetch override (testing).

    Type Declaration

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: string | URL | Request, init?: RequestInit): Promise<Response>
      • Parameters

        • input: string | URL | Request
        • Optionalinit: RequestInit

        Returns Promise<Response>

    headers?: Record<string, string>
    intervalMs?: number

    Poll interval. Default 60000.

    timeoutMs?: number

    Per-request timeout. Default 15000.