• Add a request to the batch request pool and execute it accordingly. Please note, that only non-GET requests and routes with enabled allow_batch and non-multipart request are suitable for the batch requests in WordPress.

    Type Parameters

    • TResponse

    Parameters

    • request: BatchRequestObject
    • options: {
          restNamespace: string;
          restNonce?: string;
          restPathObfuscateOffset?: string;
          restQuery?: object;
          restRecreateNonceEndpoint?: string;
          restRoot: string;
      } & {
          onQueueItemFinished?: ((state) => void);
          signal?: AbortSignal;
          waitForPromise?: Promise<void>;
      }

    Returns Promise<TResponse>