cloudevents / sdk-javascript

JavaScript/TypeScript SDK for CloudEvents
https://cloudevents.github.io/sdk-javascript/
Apache License 2.0
345 stars 69 forks source link

Add support for request timeout in HTTP transport #564

Open gnarea opened 1 year ago

gnarea commented 1 year ago

I'd be happy to propose a PR, but I'd recommend rewriting the transport with fetch instead of extending the current approach:

https://github.com/cloudevents/sdk-javascript/blob/db60220762745f95514d609a8450aa6230ca05fc/src/transport/http/index.ts#L49

... As I'd have to use setTimeout(), which would make the code more complicated.

The drawback of fetch() is that it'd require Node.js 18+. Which shouldn't be too bad as Node.js 16 is reaching EOL in a few weeks.

lholmquist commented 1 year ago

@gnarea feel free to submit a PR 👍

looks like the exact date it the 11th of September for node 16 EOL, so probably wouldn't merge until then

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity.