-
Notifications
You must be signed in to change notification settings - Fork 58
is_binary and is_structured should be in http module #92
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
Comments
I thought the purpose of structured events was to more easily pass CloudEvents in a transport agnostic manner. If so, shouldn't the API be shaped towards that use case? |
A user does not need to know if the event is structured or binary when creating a cloudevent with this framework. For example, this sample server will internally decipher both binary and structured events. There may exist a use case in which a user may want to determine if some request is binary or structured (possibly testing/debugging purposes). Additionally, I'm not all too familiar with the other protocols but I suspect the current implementations for is_binary and is_structured are oriented towards http specific fields. Therefore I wanted to export these fields to the http module. Such that a user could easily access these methods if they wanted to do so, and the methods are in the more appropriate http namespace. Let me know if that addressed your question! |
After further conversation, I understand that binary and structured events are defined per transport type, so including them in http makes sense. |
Expected Behavior
Actual Behavior
These methods at the moment comform to the http spec but aren't generalized to other specs. Therefore we would want to move these methods into the http module
The text was updated successfully, but these errors were encountered: