-
Notifications
You must be signed in to change notification settings - Fork 76
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 text/plain Media Type in CloudEventJsonInputFormatter #75
Comments
Sorry for not looking at this issue before. It seems to me that if the HTTP request has a content type of text/plain, and doesn't have a ce-specversion header, it shouldn't be recognized as a CloudEvent. Or are you saying that it does have a ce-specversion header? If you could give a sample request, that would really help. While it's very likely that the |
This commit moves it to the sample directory for now. There are elements we'll want to look at more closely before including it directly in the package, but anyone can easily look at the code and include it themselves for now, if it suits their needs. Means that cloudevents#75 doesn't block the v2 release. Signed-off-by: Jon Skeet <jonskeet@google.com>
This commit moves it to the sample directory for now. There are elements we'll want to look at more closely before including it directly in the package, but anyone can easily look at the code and include it themselves for now, if it suits their needs. Means that #75 doesn't block the v2 release. Signed-off-by: Jon Skeet <jonskeet@google.com>
This is now no longer blocking the 2.0 release, as we've moved it into the ASP.NET Core sample. However, that was basically because there's more to do to it than we have time to do right now. We should have a think about what we want it to look like for 2.1. |
I don't know that this could be considered as an issue or not, but I want to ask/suggest it anyway.
We are trying to use cloud events on OpenShift platform. Our problem is the system sends events to our ASP.NET Core application with text/plain Content-Type. We solved this by copying source code of
CloudEventJsonInputFormatter
to our project, changing its name toCloudEventTextInputFormatter
, and changingSupportedMediaTypes
to text/plain like this:Since the underlying
ReadCloudEventAsync
method does not make any transformation while reading the request body, it works like a charm. Here is the code for assigningData
field.What do you think? Could it be integrated into
CloudEventJsonInputFormatter
? All it needs is theSupportedMediaTypes
line I shared above. I could be like this:The text was updated successfully, but these errors were encountered: