Skip to main content
Version: v7.0.0

getRequestManagerEvents


Import
import { getRequestManagerEvents } from "@hyper-fetch/core"

Parameters

getRequestManagerEvents(emitter: EventEmitter)
Parameters
NameTypeDescription
emitter
EventEmitter

Returns

getRequestManagerEvents
NameTypeDescription
emitAbort
(data: RequestEventType<RequestInstance>, isTriggeredExternally: boolean) => void
emitDeduplicated
(data: RequestDeduplicatedEventType<RequestInstance>, isTriggeredExternally: boolean) => void

Emiter

emitDownloadProgress
(data: RequestProgressEventType<RequestInstance>, isTriggeredExternally: boolean) => void
emitLoading
(data: RequestLoadingEventType<RequestInstance>, isTriggeredExternally: boolean) => void
emitRemove
(data: RequestRemovedEventType<RequestInstance>, isTriggeredExternally: boolean) => void
emitRequestStart
(data: RequestEventType<RequestInstance>, isTriggeredExternally: boolean) => void
emitResponse
<Adapter>(data: RequestResponseEventType<ExtendRequest<RequestInstance, { client: Client<any, Adapter> }>>, isTriggeredExternally: boolean) => void
emitResponseStart
(data: RequestEventType<RequestInstance>, isTriggeredExternally: boolean) => void
emitUploadProgress
(data: RequestProgressEventType<RequestInstance>, isTriggeredExternally: boolean) => void
onAbort
<T>(callback: (request: RequestEventType<T>) => void) => VoidFunction
onAbortById
<T>(requestId: string, callback: (data: RequestEventType<T>) => void) => VoidFunction
onAbortByKey
<T>(abortKey: string, callback: (request: RequestEventType<T>) => void) => VoidFunction
onDeduplicated
<T>(callback: (data: RequestDeduplicatedEventType<T>) => void) => VoidFunction

Listeners

onDeduplicatedByCache
<T>(cacheKey: string, callback: (data: RequestDeduplicatedEventType<T>) => void) => VoidFunction
onDeduplicatedById
<T>(requestId: string, callback: (data: RequestDeduplicatedEventType<T>) => void) => VoidFunction
onDeduplicatedByQueue
<T>(queryKey: string, callback: (data: RequestDeduplicatedEventType<T>) => void) => VoidFunction
onDownloadProgress
<T>(callback: (data: RequestProgressEventType<T>) => void) => VoidFunction
onDownloadProgressById
<T>(requestId: string, callback: (data: RequestProgressEventType<T>) => void) => VoidFunction
onDownloadProgressByQueue
<T>(queryKey: string, callback: (data: RequestProgressEventType<T>) => void) => VoidFunction
onLoading
<T>(callback: (data: RequestLoadingEventType<T>) => void) => VoidFunction
onLoadingByCache
<T>(cacheKey: string, callback: (data: RequestLoadingEventType<T>) => void) => VoidFunction
onLoadingById
<T>(requestId: string, callback: (data: RequestLoadingEventType<T>) => void) => VoidFunction
onLoadingByQueue
<T>(queryKey: string, callback: (data: RequestLoadingEventType<T>) => void) => VoidFunction
onRemove
<T>(callback: (data: RequestRemovedEventType<T>) => void) => VoidFunction
onRemoveById
<T>(requestId: string, callback: (data: RequestRemovedEventType<T>) => void) => VoidFunction
onRemoveByQueue
<T>(queryKey: string, callback: (data: RequestRemovedEventType<T>) => void) => VoidFunction
onRequestStart
<T>(callback: (details: RequestEventType<T>) => void) => VoidFunction
onRequestStartById
<T>(requestId: string, callback: (details: RequestEventType<T>) => void) => VoidFunction
onRequestStartByQueue
<T>(queryKey: string, callback: (details: RequestEventType<T>) => void) => VoidFunction
onResponse
<T>(callback: (data: RequestResponseEventType<T>) => void) => VoidFunction
onResponseByCache
<T>(cacheKey: string, callback: (data: RequestResponseEventType<T>) => void) => VoidFunction
onResponseById
<T>(requestId: string, callback: (data: RequestResponseEventType<T>) => void) => VoidFunction
onResponseStart
<T>(callback: (details: RequestEventType<T>) => void) => VoidFunction
onResponseStartById
<T>(requestId: string, callback: (details: RequestEventType<T>) => void) => VoidFunction
onResponseStartByQueue
<T>(queryKey: string, callback: (details: RequestEventType<T>) => void) => VoidFunction
onUploadProgress
<T>(callback: (data: RequestProgressEventType<T>) => void) => VoidFunction
onUploadProgressById
<T>(requestId: string, callback: (data: RequestProgressEventType<T>) => void) => VoidFunction
onUploadProgressByQueue
<T>(queryKey: string, callback: (data: RequestProgressEventType<T>) => void) => VoidFunction
On this page