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

bidirectional chat dotnet isolated negotiate example - doesn't return a response #287

Closed
dzsquared opened this issue Jul 17, 2024 · 1 comment · Fixed by #288
Closed

Comments

@dzsquared
Copy link

public SignalRConnectionInfo Negotiate([HttpTrigger(AuthorizationLevel.Anonymous)] HttpRequestData req,

This negotiate function with the current library versions returns an empty response

alternative code that does return a response:

        [Function("Negotiate")]
        public static async Task<HttpResponseData> Negotiate(
            [HttpTrigger(AuthorizationLevel.Anonymous, Route = "negotiate")] HttpRequestData req,
            [SignalRConnectionInfoInput(HubName = "chats", UserId = "{query.userid}")] string connectionInfo)
        {
            var response = req.CreateResponse();
            response.Headers.Add("Content-Type", "application/json");
            await response.WriteStringAsync(connectionInfo);
            return response;
        }
@Y-Sindo
Copy link
Contributor

Y-Sindo commented Jul 18, 2024

Thanks for reporting the issue.

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

Successfully merging a pull request may close this issue.

2 participants