Interface: FetcherOptions<T>
Defined in: packages/http/src/fetcher.ts:34 Configuration options for the fetcher utility.Type Parameters
T
T = unknown
Properties
bodyType?
Defined in: packages/http/src/fetcher.ts:50 Body type - defaults to ‘json’, use ‘text’ for raw data, ‘form’ for FormDataoptionalbodyType?:"json"|"text"|"form"
headers?
Defined in: packages/http/src/fetcher.ts:44 Additional headers to include in the requestoptionalheaders?:Record<string,string>
onError?
Defined in: packages/http/src/fetcher.ts:40 Optional callback invoked on erroroptionalonError?: (error) =>void
Parameters
error
unknown
Returns
void
retries?
Defined in: packages/http/src/fetcher.ts:36 Number of times to retry the request on failureoptionalretries?:number
retryDelay?
Defined in: packages/http/src/fetcher.ts:38 Delay in milliseconds between retriesoptionalretryDelay?:number
schema?
Defined in: packages/http/src/fetcher.ts:46 Effect/Schema for runtime validation of the responseoptionalschema?:SyncSchema<T>
signal?
Defined in: packages/http/src/fetcher.ts:48 Abortsignaloptionalsignal?:AbortSignal
timeout?
Defined in: packages/http/src/fetcher.ts:42 Timeout in milliseconds for the requestoptionaltimeout?:number