Closed johngerome closed 1 year ago
Apparently I can override the timeout per request e.g. which solves my problem.
getUsers: client.createRequest()({
endpoint: `/users`,
options: {
timeout: DateInterval.minute * 1,
},
})
Not sure if It would be good to override the timeout in the Client as well ?
@johngerome This is correct! We can set it globally on the Client with default options (setRequestDefaultOptions) or we can adjust it for particular Request with options property directly. I will add section to the docs Explaining this. 🙏👍
@prc5 Perfect! Thank you so much.
:tada: This issue has been resolved in version 5.0.0 :tada:
The release is available on:
npm package (@latest dist-tag)
Your semantic-release bot :package::rocket:
Is your feature request related to a problem? Please describe. Hi, I've noticed that a request get cancelled If it takes more than 5 seconds to response. Can't find the correct configuration for this one here.
Is there any way I can increase the default timeout ?
In the browser adapter (even on the server), I can see the default timeout but I'm not really sure If this is the reason. https://github.com/BetterTyped/hyper-fetch/blob/ef4e3acc93f39de0ae7b742ceb46c66e859f438d/packages/core/src/adapter/adapter.browser.ts#L26
Any help would be much appreciated. Thank you.