本文整理了Java中com.ning.http.client.uri.Uri.<init>()
方法的一些代码示例,展示了Uri.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Uri.<init>()
方法的具体详情如下:
包路径:com.ning.http.client.uri.Uri
类名称:Uri
方法名:<init>
暂无
代码示例来源:origin: com.ning/async-http-client
public Uri withNewScheme(String newScheme) {
return new Uri(newScheme,//
userInfo,//
host,//
port,//
path,//
query);
}
代码示例来源:origin: com.ning/async-http-client
public Uri withNewQuery(String newQuery) {
return new Uri(scheme,//
userInfo,//
host,//
port,//
path,//
newQuery);
}
代码示例来源:origin: com.ning/async-http-client
public static Uri create(Uri context, final String originalUrl) {
UriParser parser = new UriParser();
parser.parse(context, originalUrl);
return new Uri(parser.scheme,//
parser.userInfo,//
parser.host,//
parser.port,//
parser.path,//
parser.query);
}
代码示例来源:origin: com.ning/async-http-client
public Uri encode(Uri uri, List<Param> queryParams) {
String newPath = encodePath(uri.getPath());
String newQuery = encodeQuery(uri.getQuery(), queryParams);
return new Uri(uri.getScheme(),//
uri.getUserInfo(),//
uri.getHost(),//
uri.getPort(),//
newPath,//
newQuery);
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client
public Uri withNewQuery(String newQuery) {
return new Uri(scheme,//
userInfo,//
host,//
port,//
path,//
newQuery);
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client
public Uri withNewScheme(String newScheme) {
return new Uri(newScheme,//
userInfo,//
host,//
port,//
path,//
query);
}
代码示例来源:origin: javaee/grizzly-ahc
public Uri withNewScheme(String newScheme) {
return new Uri(newScheme,//
userInfo,//
host,//
port,//
path,//
query);
}
代码示例来源:origin: javaee/grizzly-ahc
public Uri withNewQuery(String newQuery) {
return new Uri(scheme,//
userInfo,//
host,//
port,//
path,//
newQuery);
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client
public static Uri create(Uri context, final String originalUrl) {
UriParser parser = new UriParser();
parser.parse(context, originalUrl);
return new Uri(parser.scheme,//
parser.userInfo,//
parser.host,//
parser.port,//
parser.path,//
parser.query);
}
代码示例来源:origin: javaee/grizzly-ahc
public static Uri create(Uri context, final String originalUrl) {
UriParser parser = new UriParser();
parser.parse(context, originalUrl);
return new Uri(parser.scheme,//
parser.userInfo,//
parser.host,//
parser.port,//
parser.path,//
parser.query);
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-client
public Uri encode(Uri uri, List<Param> queryParams) {
String newPath = encodePath(uri.getPath());
String newQuery = encodeQuery(uri.getQuery(), queryParams);
return new Uri(uri.getScheme(),//
uri.getUserInfo(),//
uri.getHost(),//
uri.getPort(),//
newPath,//
newQuery);
}
代码示例来源:origin: javaee/grizzly-ahc
public Uri encode(Uri uri, List<Param> queryParams) {
String newPath = encodePath(uri.getPath());
String newQuery = encodeQuery(uri.getQuery(), queryParams);
return new Uri(uri.getScheme(),//
uri.getUserInfo(),//
uri.getHost(),//
uri.getPort(),//
newPath,//
newQuery);
}
代码示例来源:origin: com.github.mjeanroy/junit-servers-core
@Override
protected HttpResponse doExecute() throws Exception {
final HttpUrl endpoint = getEndpoint();
final String scheme = endpoint.getScheme();
final String userInfo = null;
final String host = endpoint.getHost();
final int port = endpoint.getPort();
final String path = UTF8UrlEncoder.encodePath(endpoint.getPath());
final String query = null;
final Uri uri = new Uri(scheme, userInfo, host, port, path, query);
final String method = getMethod().getVerb();
final RequestBuilder builder = new RequestBuilder(method, true).setUri(uri);
handleQueryParameters(builder);
handleBody(builder);
handleHeaders(builder);
handleCookies(builder);
final Request request = builder.build();
final long start = nanoTime();
final Response response = client.executeRequest(request).get();
final long duration = nanoTime() - start;
return NingAsyncHttpResponseFactory.of(response, duration);
}
代码示例来源:origin: org.mule.services/mule-service-http
});
URI uri = request.getUri();
reqBuilder.setUri(new Uri(uri.getScheme(), uri.getRawUserInfo(), uri.getHost(), uri.getPort(), uri.getRawPath(),
uri.getRawQuery()));
return reqBuilder.build();
内容来源于网络,如有侵权,请联系作者删除!