pub async fn forward_response_stream<S, T, C>(
codec: &C,
stream: S,
req: &GatewayRequest,
) -> Result<Response<BoxBody>, GatewayError>Expand description
Constructs an HTTP response from a gRPC stream.
This function collects all items from the stream, encodes them, and aggregates them into a single byte vector.
Note: This implementation buffers the entire stream in memory. This is a simplification
to ensure compatibility with tower::Service return types that expect a concrete body type.
§Parameters
codec: The codec used to encode stream items.stream: The incoming gRPC stream.req: The incoming request (used to determineAcceptheader).
§Returns
A Result containing the HTTP response with the aggregated body, or a GatewayError if processing fails.