-
Notifications
You must be signed in to change notification settings - Fork 84
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
Binary payloads? #199
Comments
It would be useful to stick to a single question per issue, otherwise we end up with "half-answered" issues. #148 covers the fact that there are some aspects which could be simpler - but it's still fairly easy to make an HTTP request with a CloudEvent: // Note that the event formatter has less to do when it comes to binary mode than structured mode,
// but formatters document how they serialize various kinds of payload data.
var content = cloudEvent.ToHttpContent(ContentModel.Binary, new JsonEventFormatter());
var httpClient = new HttpClient();
var result = await httpClient.PostAsync(uri, content); For receiving an event, there's no MVC model binding, but given a request it's easy to extract an event using the extensoin methods in CloudNative.CloudEvents.AspNetCore. |
Understood. Please also understand though I have only asked a single question, as identified by the solitary question mark in the issue text! Here is the singular question from the issue text just for clarity:
I feel the answer based on your response above is "support is there and it's missing an example" however I appreciate perhaps my question wasn't as clear and concise as it could be. Thank you for your response, I will close this. |
I had a look at the samples but I couldn't see any example of sending a cloud event over http as a binary payload, and also receiving a cloud event, with mvc model binding in play, from a binary payload rather than json. Is it just the case that support is there and it's missing an example, or is it yet to be worked on? I would be keen to compare payload difference with binary format vs json for example.
The text was updated successfully, but these errors were encountered: