Azure / Azure/azure-functions-dotnet-worker
Sample Code Error: Empty Response in SignalRNegotiationFunctions.cs
- Dominant language
- C#
- Stars
- 466
- Forks
- 215
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 7
Description
In the following sample code, there seems to be a mistake. When I implemented and ran it, I received an empty response.
https://github.com/Azure/azure-functions-dotnet-worker/blob/main/samples/Extensions/SignalR/SignalRNegotiationFunctions.cs#L12-L20
I modified the sample to the following snippet, and it worked:
```csharp
[Function(nameof(Negotiate))]
public static IActionResult Negotiate([HttpTrigger(AuthorizationLevel.Anonymous)] HttpRequest req,
[SignalRConnectionInfoInput(HubName = "serverless")] string connectionInfo) =>
// The serialization of the connection info object is done by the framework. It should be camel case. The SignalR client respects the camel case response only.
new ContentResult { ContentType = "application/json", Content = connectionInfo };
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.