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

How to use OnHttpNegotiation in 3.0.0 #141

Open
TechAspirant opened this issue May 6, 2020 · 0 comments
Open

How to use OnHttpNegotiation in 3.0.0 #141

TechAspirant opened this issue May 6, 2020 · 0 comments

Comments

@TechAspirant
Copy link

TechAspirant commented May 6, 2020

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;
                    }
                }
            };`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant