use of org.apache.flink.shaded.netty4.io.netty.handler.codec.http.QueryStringDecoder in project flink by apache.
the class RouterHandler method channelRead0.
@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);
}
use of org.apache.flink.shaded.netty4.io.netty.handler.codec.http.QueryStringDecoder in project blade by biezhi.
the class HttpRequest method parameters.
@Override
public Map<String, List<String>> parameters() {
if (initQueryParam) {
return this.parameters;
}
initQueryParam = true;
if (!url.contains("?")) {
return this.parameters;
}
var parameters = new QueryStringDecoder(url, CharsetUtil.UTF_8).parameters();
if (null != parameters) {
this.parameters.putAll(parameters);
}
return this.parameters;
}
Aggregations