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

CloudEvents from subscriptions does not follow specifications #603

Open
Hoaas opened this issue Oct 15, 2024 · 0 comments
Open

CloudEvents from subscriptions does not follow specifications #603

Hoaas opened this issue Oct 15, 2024 · 0 comments
Labels
kind/bug Something isn't working

Comments

@Hoaas
Copy link

Hoaas commented Oct 15, 2024

Description of the bug

CloudEvents received on webhook endpoint for subscriptions have Content-Type application/json, and not application/cloudevents+json as expected for CloudEvents.

This causes the CloudNative .NET Nuget package to not work.

CloudEventFormatter formatter = new JsonEventFormatter();
CloudEvent cloudEvent = await request.ToCloudEventAsync(formatter);

Using this code from the SDK guide gives error regarding missing specversion, as that is expected in http header when Content-Type is application/json. (might be related to structured / unstructured data?)

Steps To Reproduce

  1. Create subscription using /events/api/v1/subscriptions endpoint
  2. Attempt to read CloudEvent in the way described in CloudEvent guides on .NET
  3. Error occurs

Additional Information

No response

@Hoaas Hoaas added the kind/bug Something isn't working label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant