@Override protected void channelRead0(ChannelHandlerContext channelHandlerContext, HttpRequest httpRequest) { if (HttpHeaders.is100ContinueExpected(httpRequest)) { channelHandlerContext.writeAndFlush(new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.CONTINUE)); return; } // Route HttpMethod method = httpRequest.getMethod(); QueryStringDecoder qsd = new QueryStringDecoder(httpRequest.uri()); RouteResult<?> routeResult = router.route(method, qsd.path(), qsd.parameters()); if (routeResult == null) { respondNotFound(channelHandlerContext, httpRequest); return; } routed(channelHandlerContext, routeResult, httpRequest); }
@Override protected void channelRead0(ChannelHandlerContext channelHandlerContext, HttpRequest httpRequest) { if (HttpHeaders.is100ContinueExpected(httpRequest)) { channelHandlerContext.writeAndFlush(new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.CONTINUE)); return; } // Route HttpMethod method = httpRequest.getMethod(); QueryStringDecoder qsd = new QueryStringDecoder(httpRequest.uri()); RouteResult<?> routeResult = router.route(method, qsd.path(), qsd.parameters()); if (routeResult == null) { respondNotFound(channelHandlerContext, httpRequest); return; } routed(channelHandlerContext, routeResult, httpRequest); }