use of io.micronaut.http.netty.NettyHttpParameters in project micronaut-core by micronaut-projects.
the class NettyClientHttpRequest method decodeParameters.
private NettyHttpParameters decodeParameters(URI uri) {
QueryStringDecoder queryStringDecoder = createDecoder(uri);
return new NettyHttpParameters(queryStringDecoder.parameters(), ConversionService.SHARED, (name, value) -> {
UriBuilder newUri = UriBuilder.of(getUri());
newUri.replaceQueryParam(name.toString(), value.toArray());
this.uri(newUri.build());
});
}
use of io.micronaut.http.netty.NettyHttpParameters in project micronaut-core by micronaut-projects.
the class NettyClientHttpRequest method getParameters.
@Override
public MutableHttpParameters getParameters() {
NettyHttpParameters httpParameters = this.httpParameters;
if (httpParameters == null) {
synchronized (this) {
// double check
httpParameters = this.httpParameters;
if (httpParameters == null) {
httpParameters = decodeParameters(getUri());
this.httpParameters = httpParameters;
}
}
}
return httpParameters;
}
Aggregations