Documentation
    Preparing search index...
    interface PollOptions {
        interval?: number | ((context: PollContext) => number | Promise<number>);
        limit?: number;
        shouldPoll?: (context: PollContext) => boolean | Promise<boolean>;
        statusCodes?: number[];
    }
    Index

    Properties

    interval?: number | ((context: PollContext) => number | Promise<number>)

    The delay between polling attempts in milliseconds.

    1000
    
    limit?: number

    The maximum number of pollable responses before returning the last response.

    10
    
    shouldPoll?: (context: PollContext) => boolean | Promise<boolean>

    Called after built-in checks pass, before polling continues.

    Returning false stops polling and returns the current response.

    Type Declaration

      • (context: PollContext): boolean | Promise<boolean>
      • Parameters

        Returns boolean | Promise<boolean>

        • Whether to continue polling
    statusCodes?: number[]

    The HTTP status codes that should trigger polling. Status codes in the range 200-299.

    [202]