List of usage examples for io.netty.handler.codec.http2 HttpConversionUtil toHttpResponse
public static HttpResponse toHttpResponse(final int streamId, final Http2Headers http2Headers, final boolean validateHttpHeaders) throws Http2Exception
From source file:io.gatling.http.client.impl.ChunkedInboundHttp2ToHttpAdapter.java
License:Apache License
private void convertAndFire(ChannelHandlerContext ctx, int streamId, Http2Headers headers, boolean endOfStream) throws Http2Exception { HttpResponse response = HttpConversionUtil.toHttpResponse(streamId, headers, validateHttpHeaders); ctx.fireChannelRead(response);/* ww w. j av a 2s . c o m*/ if (endOfStream) { ctx.fireChannelRead(new Http2Content(LastHttpContent.EMPTY_LAST_CONTENT, streamId)); } }