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

[API Proposal]: Add MediaTypeNames.Text.EventStream for server-sent events #102194

Closed
stephentoub opened this issue May 14, 2024 · 3 comments
Closed
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Net
Milestone

Comments

@stephentoub
Copy link
Member

stephentoub commented May 14, 2024

Background and motivation

SSE has become more popular, especially as it's been used for streaming with AI services. #98105 is adding a parser for SSE. If you get an HTTP response with a "text/event-stream" MIME type, that indicates the response body should be treated as SSE.

API Proposal

namespace System.Net.Mime;

public static class MediaTypeNames
{
    public static class Text
    {
+       public const string EventStream = "text/event-stream";
        ...
    }
}

API Usage

n/a

Alternative Designs

n/a

Risks

n/a

@stephentoub stephentoub added api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Net labels May 14, 2024
@stephentoub stephentoub added this to the 9.0.0 milestone May 14, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@ManickaP
Copy link
Member

ManickaP commented May 14, 2024

We could probably merge this into #95446 where we're collecting new additions.

@MihaZupan
Copy link
Member

Superseded by #95446

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Net
Projects
None yet
Development

No branches or pull requests

3 participants