8 references to JsonRequestHelpers
Microsoft.AspNetCore.Grpc.JsonTranscoding (8)
Internal\CallHandlers\ServerStreamingServerCallHandler.cs (1)
30
var request = await
JsonRequestHelpers
.ReadMessage<TRequest>(serverCallContext, SerializerOptions);
Internal\CallHandlers\UnaryServerCallHandler.cs (2)
31
var request = await
JsonRequestHelpers
.ReadMessage<TRequest>(serverCallContext, SerializerOptions);
54
await
JsonRequestHelpers
.SendMessage(serverCallContext, SerializerOptions, response, CancellationToken.None);
Internal\HttpContextStreamWriter.cs (1)
94
await
JsonRequestHelpers
.SendMessage(_context, _serializerOptions, message, cancellationToken);
Internal\JsonRequestHelpers.cs (1)
395
await
JsonRequestHelpers
.WriteResponseMessage(response, serverCallContext.RequestEncoding, responseBody, serializerOptions, cancellationToken);
Internal\JsonTranscodingServerCallContext.cs (3)
51
IsJsonRequestContent =
JsonRequestHelpers
.HasJsonContentType(HttpContext.Request, out var charset);
52
RequestEncoding =
JsonRequestHelpers
.GetEncodingFromCharset(charset) ?? Encoding.UTF8;
129
await
JsonRequestHelpers
.SendErrorResponse(HttpContext.Response, RequestEncoding, ResponseTrailers, status, options);