Closed brandonryan closed 3 weeks ago
Hi @brandonryan,
nice point, signal
will be added to: https://github.com/odata2ts/http-client/blob/main/packages/fetch/src/FetchRequestConfig.ts#L9
Actually, it's "only" the typing of the fetch request options that is over-restrictive. So you can pass any valid fetch request config including the signal
property. Just @ts-ignore
it for now as workaround.
Solved with release @odata2ts/http-client-fetch@0.8.0
.
Please test and close this issue if successful.
Oops, missed this. Yes it is fixed. thank you!
add
signal?: AbortSignal
toFetchRequestConfig
to allow clients to cancel requests.Right now in my react application, when a filter changes, but a request is in flight, I have no way to cancel the old request. Adding this feature would solve that problem.