com.ning.http.client.uri.Uri.<init>()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(207)

本文整理了Java中com.ning.http.client.uri.Uri.<init>()方法的一些代码示例,展示了Uri.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Uri.<init>()方法的具体详情如下:
包路径:com.ning.http.client.uri.Uri
类名称:Uri
方法名:<init>

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();

相关文章