io.vertx.core.http.HttpClient.head()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(12.3k)|赞(0)|评价(0)|浏览(161)

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

HttpClient.head介绍

[英]Create an HTTP HEAD request to send to the server at the specified host and port.
[中]创建HTTP HEAD请求以发送到指定主机和端口的服务器。

代码示例

代码示例来源:origin: io.vertx/vertx-rx-java

/**
 * Create an HTTP HEAD request to send to the server at the specified host and port.
 * @param port the port
 * @param host the host
 * @param requestURI the relative URI
 * @return an HTTP client request object
 */
public io.vertx.rxjava.core.http.HttpClientRequest head(int port, String host, String requestURI) { 
 io.vertx.rxjava.core.http.HttpClientRequest ret = io.vertx.rxjava.core.http.HttpClientRequest.newInstance(delegate.head(port, host, requestURI));
 return ret;
}

代码示例来源:origin: io.vertx/vertx-rx-java

/**
 * Create an HTTP HEAD request to send to the server at the specified host and default port.
 * @param host the host
 * @param requestURI the relative URI
 * @return an HTTP client request object
 */
public io.vertx.rxjava.core.http.HttpClientRequest head(String host, String requestURI) { 
 io.vertx.rxjava.core.http.HttpClientRequest ret = io.vertx.rxjava.core.http.HttpClientRequest.newInstance(delegate.head(host, requestURI));
 return ret;
}

代码示例来源:origin: vert-x3/vertx-rx

/**
 * Create an HTTP HEAD request to send to the server at the specified host and default port.
 * @param host the host
 * @param requestURI the relative URI
 * @return an HTTP client request object
 */
public io.vertx.rxjava.core.http.HttpClientRequest head(String host, String requestURI) { 
 io.vertx.rxjava.core.http.HttpClientRequest ret = io.vertx.rxjava.core.http.HttpClientRequest.newInstance(delegate.head(host, requestURI));
 return ret;
}

代码示例来源:origin: io.vertx/vertx-rx-java

/**
 * Create an HTTP HEAD request to send to the server at the default host and port.
 * @param requestURI the relative URI
 * @return an HTTP client request object
 */
public io.vertx.rxjava.core.http.HttpClientRequest head(String requestURI) { 
 io.vertx.rxjava.core.http.HttpClientRequest ret = io.vertx.rxjava.core.http.HttpClientRequest.newInstance(delegate.head(requestURI));
 return ret;
}

代码示例来源:origin: vert-x3/vertx-rx

/**
 * Create an HTTP HEAD request to send to the server with the specified options.
 * @param options the request options
 * @return an HTTP client request object
 */
public io.vertx.rxjava.core.http.HttpClientRequest head(RequestOptions options) { 
 io.vertx.rxjava.core.http.HttpClientRequest ret = io.vertx.rxjava.core.http.HttpClientRequest.newInstance(delegate.head(options));
 return ret;
}

代码示例来源:origin: vert-x3/vertx-rx

/**
 * Create an HTTP HEAD request to send to the server at the default host and port.
 * @param requestURI the relative URI
 * @return an HTTP client request object
 */
public io.vertx.rxjava.core.http.HttpClientRequest head(String requestURI) { 
 io.vertx.rxjava.core.http.HttpClientRequest ret = io.vertx.rxjava.core.http.HttpClientRequest.newInstance(delegate.head(requestURI));
 return ret;
}

代码示例来源:origin: io.vertx/vertx-rx-java

/**
 * Create an HTTP HEAD request to send to the server with the specified options.
 * @param options the request options
 * @return an HTTP client request object
 */
public io.vertx.rxjava.core.http.HttpClientRequest head(RequestOptions options) { 
 io.vertx.rxjava.core.http.HttpClientRequest ret = io.vertx.rxjava.core.http.HttpClientRequest.newInstance(delegate.head(options));
 return ret;
}

代码示例来源:origin: vert-x3/vertx-rx

/**
 * Create an HTTP HEAD request to send to the server at the specified host and port.
 * @param port the port
 * @param host the host
 * @param requestURI the relative URI
 * @return an HTTP client request object
 */
public io.vertx.rxjava.core.http.HttpClientRequest head(int port, String host, String requestURI) { 
 io.vertx.rxjava.core.http.HttpClientRequest ret = io.vertx.rxjava.core.http.HttpClientRequest.newInstance(delegate.head(port, host, requestURI));
 return ret;
}

代码示例来源:origin: io.vertx/vertx-rx-java

/**
 * Create an HTTP HEAD request to send to the server with the specified options, specifying a response handler to receive
 * the response
 * @param options the request options
 * @param responseHandler the response handler
 * @return an HTTP client request object
 */
@Deprecated()
public io.vertx.rxjava.core.http.HttpClientRequest head(RequestOptions options, Handler<io.vertx.rxjava.core.http.HttpClientResponse> responseHandler) { 
 io.vertx.rxjava.core.http.HttpClientRequest ret = io.vertx.rxjava.core.http.HttpClientRequest.newInstance(delegate.head(options, new Handler<io.vertx.core.http.HttpClientResponse>() {
  public void handle(io.vertx.core.http.HttpClientResponse event) {
   responseHandler.handle(io.vertx.rxjava.core.http.HttpClientResponse.newInstance(event));
  }
 }));
 return ret;
}

代码示例来源:origin: io.vertx/vertx-rx-java

/**
 * Create an HTTP HEAD request to send to the server at the default host and port, specifying a response handler to receive
 * the response
 * @param requestURI the relative URI
 * @param responseHandler the response handler
 * @return an HTTP client request object
 */
@Deprecated()
public io.vertx.rxjava.core.http.HttpClientRequest head(String requestURI, Handler<io.vertx.rxjava.core.http.HttpClientResponse> responseHandler) { 
 io.vertx.rxjava.core.http.HttpClientRequest ret = io.vertx.rxjava.core.http.HttpClientRequest.newInstance(delegate.head(requestURI, new Handler<io.vertx.core.http.HttpClientResponse>() {
  public void handle(io.vertx.core.http.HttpClientResponse event) {
   responseHandler.handle(io.vertx.rxjava.core.http.HttpClientResponse.newInstance(event));
  }
 }));
 return ret;
}

代码示例来源:origin: vert-x3/vertx-rx

/**
 * Create an HTTP HEAD request to send to the server at the specified host and default port, specifying a response handler to receive
 * the response
 * @param host the host
 * @param requestURI the relative URI
 * @param responseHandler the response handler
 * @return an HTTP client request object
 */
public io.vertx.rxjava.core.http.HttpClientRequest head(String host, String requestURI, Handler<AsyncResult<io.vertx.rxjava.core.http.HttpClientResponse>> responseHandler) { 
 io.vertx.rxjava.core.http.HttpClientRequest ret = io.vertx.rxjava.core.http.HttpClientRequest.newInstance(delegate.head(host, requestURI, new Handler<AsyncResult<io.vertx.core.http.HttpClientResponse>>() {
  public void handle(AsyncResult<io.vertx.core.http.HttpClientResponse> ar) {
   if (ar.succeeded()) {
    responseHandler.handle(io.vertx.core.Future.succeededFuture(io.vertx.rxjava.core.http.HttpClientResponse.newInstance(ar.result())));
   } else {
    responseHandler.handle(io.vertx.core.Future.failedFuture(ar.cause()));
   }
  }
 }));
 return ret;
}

代码示例来源:origin: io.vertx/vertx-rx-java

/**
 * Create an HTTP HEAD request to send to the server at the specified host and default port, specifying a response handler to receive
 * the response
 * @param host the host
 * @param requestURI the relative URI
 * @param responseHandler the response handler
 * @return an HTTP client request object
 */
@Deprecated()
public io.vertx.rxjava.core.http.HttpClientRequest head(String host, String requestURI, Handler<io.vertx.rxjava.core.http.HttpClientResponse> responseHandler) { 
 io.vertx.rxjava.core.http.HttpClientRequest ret = io.vertx.rxjava.core.http.HttpClientRequest.newInstance(delegate.head(host, requestURI, new Handler<io.vertx.core.http.HttpClientResponse>() {
  public void handle(io.vertx.core.http.HttpClientResponse event) {
   responseHandler.handle(io.vertx.rxjava.core.http.HttpClientResponse.newInstance(event));
  }
 }));
 return ret;
}

代码示例来源:origin: io.vertx/vertx-rx-java

/**
 * Create an HTTP HEAD request to send to the server at the specified host and port, specifying a response handler to receive
 * the response
 * @param port the port
 * @param host the host
 * @param requestURI the relative URI
 * @param responseHandler the response handler
 * @return an HTTP client request object
 */
@Deprecated()
public io.vertx.rxjava.core.http.HttpClientRequest head(int port, String host, String requestURI, Handler<io.vertx.rxjava.core.http.HttpClientResponse> responseHandler) { 
 io.vertx.rxjava.core.http.HttpClientRequest ret = io.vertx.rxjava.core.http.HttpClientRequest.newInstance(delegate.head(port, host, requestURI, new Handler<io.vertx.core.http.HttpClientResponse>() {
  public void handle(io.vertx.core.http.HttpClientResponse event) {
   responseHandler.handle(io.vertx.rxjava.core.http.HttpClientResponse.newInstance(event));
  }
 }));
 return ret;
}

代码示例来源:origin: vert-x3/vertx-rx

/**
 * Create an HTTP HEAD request to send to the server at the specified host and port, specifying a response handler to receive
 * the response
 * @param port the port
 * @param host the host
 * @param requestURI the relative URI
 * @param responseHandler the response handler
 * @return an HTTP client request object
 */
public io.vertx.rxjava.core.http.HttpClientRequest head(int port, String host, String requestURI, Handler<AsyncResult<io.vertx.rxjava.core.http.HttpClientResponse>> responseHandler) { 
 io.vertx.rxjava.core.http.HttpClientRequest ret = io.vertx.rxjava.core.http.HttpClientRequest.newInstance(delegate.head(port, host, requestURI, new Handler<AsyncResult<io.vertx.core.http.HttpClientResponse>>() {
  public void handle(AsyncResult<io.vertx.core.http.HttpClientResponse> ar) {
   if (ar.succeeded()) {
    responseHandler.handle(io.vertx.core.Future.succeededFuture(io.vertx.rxjava.core.http.HttpClientResponse.newInstance(ar.result())));
   } else {
    responseHandler.handle(io.vertx.core.Future.failedFuture(ar.cause()));
   }
  }
 }));
 return ret;
}

代码示例来源:origin: vert-x3/vertx-rx

/**
 * Create an HTTP HEAD request to send to the server with the specified options, specifying a response handler to receive
 * the response
 * @param options the request options
 * @param responseHandler the response handler
 * @return an HTTP client request object
 */
public io.vertx.rxjava.core.http.HttpClientRequest head(RequestOptions options, Handler<AsyncResult<io.vertx.rxjava.core.http.HttpClientResponse>> responseHandler) { 
 io.vertx.rxjava.core.http.HttpClientRequest ret = io.vertx.rxjava.core.http.HttpClientRequest.newInstance(delegate.head(options, new Handler<AsyncResult<io.vertx.core.http.HttpClientResponse>>() {
  public void handle(AsyncResult<io.vertx.core.http.HttpClientResponse> ar) {
   if (ar.succeeded()) {
    responseHandler.handle(io.vertx.core.Future.succeededFuture(io.vertx.rxjava.core.http.HttpClientResponse.newInstance(ar.result())));
   } else {
    responseHandler.handle(io.vertx.core.Future.failedFuture(ar.cause()));
   }
  }
 }));
 return ret;
}

代码示例来源:origin: vert-x3/vertx-rx

/**
 * Create an HTTP HEAD request to send to the server at the default host and port, specifying a response handler to receive
 * the response
 * @param requestURI the relative URI
 * @param responseHandler the response handler
 * @return an HTTP client request object
 */
public io.vertx.rxjava.core.http.HttpClientRequest head(String requestURI, Handler<AsyncResult<io.vertx.rxjava.core.http.HttpClientResponse>> responseHandler) { 
 io.vertx.rxjava.core.http.HttpClientRequest ret = io.vertx.rxjava.core.http.HttpClientRequest.newInstance(delegate.head(requestURI, new Handler<AsyncResult<io.vertx.core.http.HttpClientResponse>>() {
  public void handle(AsyncResult<io.vertx.core.http.HttpClientResponse> ar) {
   if (ar.succeeded()) {
    responseHandler.handle(io.vertx.core.Future.succeededFuture(io.vertx.rxjava.core.http.HttpClientResponse.newInstance(ar.result())));
   } else {
    responseHandler.handle(io.vertx.core.Future.failedFuture(ar.cause()));
   }
  }
 }));
 return ret;
}

代码示例来源:origin: io.vertx/vertx-lang-groovy

public static io.vertx.core.http.HttpClientRequest head(io.vertx.core.http.HttpClient j_receiver, java.util.Map<String, Object> options) {
 return io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.head(options != null ? new io.vertx.core.http.RequestOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null));
}
public static io.vertx.core.http.HttpClientRequest head(io.vertx.core.http.HttpClient j_receiver, java.util.Map<String, Object> options, io.vertx.core.Handler<io.vertx.core.http.HttpClientResponse> responseHandler) {

代码示例来源:origin: io.vertx/vertx-lang-groovy

public static io.vertx.core.http.HttpClientRequest head(io.vertx.core.http.HttpClient j_receiver, java.util.Map<String, Object> options, io.vertx.core.Handler<io.vertx.core.http.HttpClientResponse> responseHandler) {
 return io.vertx.core.impl.ConversionHelper.fromObject(j_receiver.head(options != null ? new io.vertx.core.http.RequestOptions(io.vertx.core.impl.ConversionHelper.toJsonObject(options)) : null,
  responseHandler != null ? event -> responseHandler.handle(io.vertx.core.impl.ConversionHelper.fromObject(event)) : null));
}
public static io.vertx.core.http.HttpClient headNow(io.vertx.core.http.HttpClient j_receiver, java.util.Map<String, Object> options, io.vertx.core.Handler<io.vertx.core.http.HttpClientResponse> responseHandler) {

代码示例来源:origin: vietj/vertx-http-proxy

ctx.assertEquals("content", buff.toString());
vertx.setTimer(3000, id -> {
 client.head(8080, "localhost", "/img.jpg", resp2 -> {
  ctx.assertEquals(200, resp2.statusCode());
  resp2.bodyHandler(buff2 -> {

相关文章