Skip to content

How to use OnHttpNegotiation in 3.0.0 #141

@TechAspirant

Description

@TechAspirant

Hello,

I am having .Net core 2.1 Application with nuget package version 3.0.0, I am getting error while using OnHttpNegotiation in my application as below as it expects return type and I dnt know how to use in Websocketlistner options

`var wsoptions = new vtortola.WebSockets.WebSocketListenerOptions()
            {
                OnHttpNegotiation = (request, response) =>
                {
                    if (request.RequestUri.ToString() == "/1")
                    {
                        response.Status = vtortola.WebSockets.HttpStatusCode.BadRequest;
                    }
                    else
                    {
                        response.Status = vtortola.WebSockets.HttpStatusCode.Accepted;
                    }
                }
            };`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions