public Task HandleCallAsync(HttpContext httpContext)
        {
            if (!GrpcProtocolHelpers.IsValidContentType(httpContext, out var error))
            {
                return(GrpcProtocolHelpers.SendHttpError(httpContext.Response, StatusCode.Internal, error));
            }

            return(HandleCallAsyncCore(httpContext));
        }
Ejemplo n.º 2
0
        public Task HandleCallAsync(HttpContext httpContext)
        {
            if (!GrpcProtocolHelpers.IsValidContentType(httpContext, out var error))
            {
                GrpcProtocolHelpers.SendHttpError(httpContext.Response, StatusCodes.Status415UnsupportedMediaType, StatusCode.Internal, error);
                return(Task.CompletedTask);
            }

            return(HandleCallAsyncCore(httpContext));
        }