GeoLeaf Core API - v3.0.0
    Preparing search index...

    Variable FetchHelperConst

    FetchHelper: {
        fetch(url: string, options?: FetchHelperOptions): Promise<unknown>;
        _executeRequest(
            url: string,
            config: FetchHelperOptions,
            attempt: number,
        ): Promise<unknown>;
        _parseResponse(response: Response): Promise<unknown>;
        _delay(ms: number): Promise<void>;
        get(url: string, options?: FetchHelperOptions): Promise<unknown>;
        post(
            url: string,
            data: unknown,
            options?: FetchHelperOptions,
        ): Promise<unknown>;
        head(url: string, options?: FetchHelperOptions): Promise<Response>;
        exists(url: string, options?: FetchHelperOptions): Promise<boolean>;
        configure(config: Partial<FetchHelperOptions>): void;
        getConfig(): FetchHelperOptions;
        get _rateLimiter(): {
            _requests: Map<string, number[]>;
            maxPerDomain: number;
            windowMs: number;
            allow(url: string): boolean;
            reset(): void;
        };
    } = ...

    Fetch wrapper adding timeouts, typed errors and JSON handling.

    Throws FetchError on a non-OK status instead of returning a response the caller must remember to check — the default fetch behaviour being the usual source of silently ignored 404s.

    Type Declaration