本文整理了Java中org.vertx.java.core.http.HttpClient.request()
方法的一些代码示例,展示了HttpClient.request()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpClient.request()
方法的具体详情如下:
包路径:org.vertx.java.core.http.HttpClient
类名称:HttpClient
方法名:request
[英]This method returns an HttpClientRequest instance which represents an HTTP request with the specified uri. The specific HTTP method (e.g. GET, POST, PUT etc) is specified using the parameter method
When an HTTP response is received from the server the responseHandler is called passing in the response.
[中]此方法返回一个HttpClientRequest实例,该实例表示具有指定uri的HTTP请求。使用参数方法指定特定的HTTP方法(例如GET、POST、PUT等)
当从服务器接收到HTTP响应时,将调用responseHandler传递响应。
代码示例来源:origin: vert-x/mod-lang-php
/**
* Executes a request.
*/
public HttpClientRequest request(Env env, StringValue method, StringValue uri, Value handler) {
PhpTypes.assertCallable(env, handler, "Argument to Vertx\\Http\\HttpClient::request() must be callable.");
return new HttpClientRequest(client.request(method.toString(), uri.toString(), createResponseHandler(env, handler)));
}
代码示例来源:origin: io.vertx/mod-rxvertx
HttpClientRequest req=core.request(method,uri,rh);
代码示例来源:origin: boonproject/boon
final HttpClientRequest httpClientRequest = httpClient.request(request.getMethod(), request.uri(),
handleResponse(request, responseHandler));
代码示例来源:origin: boonproject/boon
final HttpClientRequest httpClientRequest = httpClient.request(request.getMethod(), request.uri(),
handleResponse(request, responseHandler));
代码示例来源:origin: io.fastjson/etcd-client
final HttpClientRequest httpClientRequest = httpClient.request(request.getMethod(), request.uri(),
handleResponse(request, responseHandler));
代码示例来源:origin: jboss-fuse/fabric8
final HttpClientRequest clientRequest = client.request(request.method(), servicePath, responseHandler);
clientRequest.headers().set(request.headers());
clientRequest.setChunked(true);
代码示例来源:origin: com.englishtown/vertx-mod-when
HttpClientRequest request = client.request(method, url,
response -> response.bodyHandler(
body -> {
代码示例来源:origin: com.englishtown/vertx-mod-when
HttpClientRequest request = client.request(method, url, response -> {
内容来源于网络,如有侵权,请联系作者删除!