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

ASP.NET Core example to show how to return a CloudEvent #43

Closed
meteatamel opened this issue Feb 18, 2020 · 2 comments
Closed

ASP.NET Core example to show how to return a CloudEvent #43

meteatamel opened this issue Feb 18, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@meteatamel
Copy link

The ASP.NET Core example shows how to receive and a CloudEvent. However, there's no example to show how to return a CloudEvent from a controller. I've been trying to figure this out with no success so far. A sample would be quite helpful.

@jskeet
Copy link
Contributor

jskeet commented May 7, 2021

We can do better than an example... we should have an extension method of:

public static CopyToHttpResponse(
    this CloudEvent cloudEvent,
    HttpResponse response,
    ContentMode contentMode,
    CloudEventFormatter eventFormatter)

... and probably the same for CopyToHttpRequest as well. Shouldn't be terribly hard to do that, given the other implementations we've got.

@jskeet jskeet self-assigned this May 7, 2021
@jskeet jskeet added the enhancement New feature or request label May 7, 2021
@jskeet
Copy link
Contributor

jskeet commented May 24, 2021

This is now covered in #148 as a broader review of HTTP method availability.

@jskeet jskeet closed this as completed May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants