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

Support case insensitive cloudevent payloads and forward cloudevent props s headers #1153

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

IliasP91
Copy link

@IliasP91 IliasP91 commented Sep 25, 2023

Description

Extend the existing CloudEvent Middleware to:

  • Accept case insensitive cloudevent payloads
  • Extend its options to forward cloudevent props as HTTP Request.Headers

This will make the middleware accept JSON payloads that are Pascal cases, as the default ASP Net core options already do.
And add the option to forward all the cloud event properties that are not automatically forwarded by the Dapr sidecar as headers. I had a use case where I wanted to read the type of the event (not just filter it) in my handler and currently there is no way of doing it as the middleware just unfolds the cloudevent envelope and discards it.

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation (NA in this case there's no section that describes the UseCloudEvents() method, happy to create one of you think its valuable. I have extended one of the examples though)

@IliasP91 IliasP91 requested review from a team as code owners September 25, 2023 23:03
@IliasP91 IliasP91 force-pushed the feature/forward-cloud-event-properties branch from 1c3a2a4 to cb811e6 Compare September 25, 2023 23:11
@IliasP91 IliasP91 force-pushed the feature/forward-cloud-event-properties branch from f1f6741 to 004a985 Compare October 4, 2023 21:18
@IliasP91 IliasP91 force-pushed the feature/forward-cloud-event-properties branch 4 times, most recently from 59fdc8b to b42cf63 Compare October 13, 2023 19:20
Signed-off-by: Ilias Politsopoulos <polil91@hotmail.com>
Signed-off-by: Ilias Politsopoulos <polil91@hotmail.com>
Signed-off-by: Ilias Politsopoulos <polil91@hotmail.com>
Signed-off-by: Ilias Politsopoulos <polil91@hotmail.com>
Signed-off-by: Ilias Politsopoulos <polil91@hotmail.com>
Signed-off-by: Ilias Politsopoulos <polil91@hotmail.com>
Signed-off-by: Ilias Politsopoulos <polil91@hotmail.com>
Signed-off-by: Ilias Politsopoulos <polil91@hotmail.com>
@IliasP91 IliasP91 force-pushed the feature/forward-cloud-event-properties branch from b42cf63 to c58b307 Compare October 13, 2023 19:21
@IliasP91
Copy link
Author

IliasP91 commented Dec 1, 2023

hi again, could someone have a look at this PR? I has been sitting there for a few months now...

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

Successfully merging this pull request may close these issues.

None yet

2 participants