Timeout/Cancel requests w. node-fetch
Is there a working way on how to timeout requests with generated APIs using node-fetch?
There is an example here https://github.com/ferdikoomen/openapi-typescript-codegen/blob/56c62af2d6901a128e403331324649bbf4d67cff/docs/canceling-requests.md that uses CancelablePromise, but both functions isRejected and isResolved don't seem to be implemented for that class, only isCancelled.
This is resolved already? Otherwise I can create a pull-request
This is resolved already? Otherwise I can create a pull-request
Doesn't seem like so as I faced the same issue. Only isCancelled is exposed at the moment.
Exposing isRejected and isResolved in the public API would solve it: https://github.com/ferdikoomen/openapi-typescript-codegen/blob/0dfebbdfc8bc92047e1abf84c205f6e3a3f50fa8/src/templates/core/CancelablePromise.hbs
If you don't do it @viniciuspalma let me know and I can take care of it.
Any feedback on this @ferdikoomen?