We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It hurts my eyes to see the escaped JSON assigned to string kevent:
string kevent
[Function("KafkaOutputWithHeaders")] public static MultipleOutputType Output( [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = null)] HttpRequestData req, FunctionContext executionContext) { var log = executionContext.GetLogger("HttpFunction"); log.LogInformation("C# HTTP trigger function processed a request."); string message = req.FunctionContext .BindingContext .BindingData["message"] .ToString(); string kevent = "{ \"Offset\":364,\"Partition\":0,\"Topic\":\"kafkaeventhubtest1\",\"Timestamp\":\"2022-04-09T03:20:06.591Z\", \"Value\": \"" + message + "\", \"Headers\": [{ \"Key\": \"test\", \"Value\": \"dotnet-isolated\" }] }"; var response = req.CreateResponse(HttpStatusCode.OK); return new MultipleOutputType() { Kevent = kevent, HttpResponse = response }; }
Please make it strongly typed. This implementation needs improvement.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It hurts my eyes to see the escaped JSON assigned to
string kevent
:Please make it strongly typed. This implementation needs improvement.
The text was updated successfully, but these errors were encountered: