-
-
Notifications
You must be signed in to change notification settings - Fork 613
Open
Labels
enhancementNew feature or requestNew feature or requestopenapi-fetchRelevant to the openapi-fetch libraryRelevant to the openapi-fetch library
Description
Description
createClient has an option to pass a signal:
const client = createClient<paths>({
baseUrl,
signal: AbortSignal.timeout(18000)
});However, I think passing AbortSignal.timeout to this creates a timeout from the point of calling createClient rather than at the point of each request.
Proposal
Should the signal option of createClient accept a function that returns a signal, so that it can be recreated for each request?
Extra
- I’m willing to open a PR (see CONTRIBUTING.md)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestopenapi-fetchRelevant to the openapi-fetch libraryRelevant to the openapi-fetch library