UNPKG

@coveo/platform-client

Version:

The main goal of this package is to provide an easy to configure and straightforward way of querying Coveo Cloud APIs using JavaScript.

10 lines (9 loc) 577 B
import { AsyncSupplier, Predicate } from './types.js'; /** * Creates a method to perform a fetch request. Can be retried by calling the method again. * @param url The URL to use for the request. * @param init The parameters to provide to the request. * @param shouldReject Predicate to see if the response should be (Promise) rejected. * @returns A method, taking no arguments, that may be called multiple times to repeat the request. */ export declare const createFetcher: (url: string, init: RequestInit, shouldReject?: Predicate<Response>) => AsyncSupplier<Response>;