Class Http3GrpcResponseWriter

java.lang.Object
org.mockserver.responsewriter.ResponseWriter
org.mockserver.netty.http3.Http3GrpcResponseWriter
All Implemented Interfaces:
GrpcStreamResponseWriter

public class Http3GrpcResponseWriter extends ResponseWriter implements GrpcStreamResponseWriter
A ResponseWriter that writes gRPC responses over HTTP/3 with correct gRPC wire framing: initial HEADERS (:status=200, content-type=application/grpc), DATA (gRPC length-prefixed message), and trailing HEADERS (grpc-status, grpc-message).

This follows the gRPC-over-HTTP/3 convention (same as HTTP/2): the grpc-status is conveyed in a trailing HEADERS frame at end-of-stream, which gRPC clients require. The initial HEADERS frame does NOT contain grpc-status.

For error responses without a body, the "trailers-only" pattern is used: a single HEADERS frame containing both :status=200 and grpc-status (no DATA frame).

The gRPC service and method names are captured from the original request (where GrpcHttp3Adapter places them as x-grpc-service and x-grpc-method headers) rather than from the response, because the matching pipeline does not propagate these internal headers to the matched response.