use of 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 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;
}
use of io.netty.handler.codec.http.QueryStringDecoder in project incubator-servicecomb-java-chassis by apache.
the class CseClientHttpRequest method execute.
@Override
public ClientHttpResponse execute() {
path = findUriPath(uri);
requestMeta = createRequestMeta(method.name(), uri);
QueryStringDecoder queryStringDecoder = new QueryStringDecoder(uri.getRawSchemeSpecificPart());
queryParams = queryStringDecoder.parameters();
Map<String, Object> swaggerArguments = this.collectArguments();
// 异常流程,直接抛异常出去
return this.invoke(swaggerArguments);
}
Aggregations