Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider removing or breaking out http/request helpers #575

Open
willmcclellan opened this issue Dec 13, 2023 · 3 comments
Open

Consider removing or breaking out http/request helpers #575

willmcclellan opened this issue Dec 13, 2023 · 3 comments

Comments

@willmcclellan
Copy link

Is your feature request related to a problem? Please describe.
The module can't be used in across node/browser/react-native environments by default. Because the http module is only available in node you have to use the browser bundle which is awkward if you're including cloudevents within a npm package you're using across different environments. Similar issue reported here #534

Describe the solution you would like to see
Remove the request helpers or break them out into a separate package.

Additional context
It feels like the core library should focus on the cloudevent spec (creating & validating events) only and leave the implementation of sending events up to the developer. I do see the value in having something available out the box, but in our case we have existing implementations in place for http/websockets etc.

To work around this we have to conditional import the browser bundle which is a lot more awkward than just a simpler, universal package.

Copy link
Contributor

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

@YohanSciubukgian
Copy link

YohanSciubukgian commented Mar 6, 2024

I'm facing the same issue.
I would like to only use the CloudEvent format, serialize it with the serializer I want, then send it whatever the protocol is (on our case, via WebSocket using Socket.io).
Ideal solution would be to have a "core" package that will only implement the CloudEvent format without any other OSS dependency.

I like the way the Cloudevents JAVA SDK provide different packages based on each need, so we can use the only necessary dependencies for our project and also limit security exposure area with too many sub dependencies that are not needed for our project. Even serializers should not be part from the core package.

Basically, on the JAVA SDK, you can choose to use different packages for each project requirements:

  • protocol (http, amqp, ...)
  • serializer (json, xml, ..)
  • available in pure java or via spring implementation

image

Copy link
Contributor

github-actions bot commented Apr 6, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants