Skip to content

Support Dynamic SSE Endpoints Like /:uid/sse #118

Closed
@weibaohui

Description

@weibaohui

By default, the SSE (Server-Sent Events) endpoint is /sse. But I want to use different endpoints like /xxxxx/sse or /yyyyy/sse, similar to how Gin handles routes like /:uid/sse.

I’d like to use server.WithSSEContextFunc(ctxFn) and pass in a custom function that can extract the xxxxx or yyyyy part from the http.Request. Based on that value, I will inject different information into the context (ctx) for further logic.

Can you help me do this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions