Skip to content

Consider removing or breaking out http/request helpers #575

Open

Description

@willmcclellan

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.

Activity

  1. github-actions commented on Jan 13, 2024

    @github-actions
    Contributor

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

  2. YohanSciubukgian commented on Mar 6, 2024

    @YohanSciubukgian

    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

  3. github-actions commented on Apr 6, 2024

    @github-actions
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions