本文整理了Java中org.vertx.java.core.http.HttpClient.getNow()
方法的一些代码示例,展示了HttpClient.getNow()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpClient.getNow()
方法的具体详情如下:
包路径:org.vertx.java.core.http.HttpClient
类名称:HttpClient
方法名:getNow
[英]This method works in the same manner as #getNow(String,org.vertx.java.core.Handler), except that it allows you specify a set of headers that will be sent with the request.
[中]此方法的工作方式与#getNow(String,org.vertx.java.core.Handler)相同,只是它允许您指定一组将随请求一起发送的头。
代码示例来源:origin: io.vertx/mod-rxvertx
public Observable<RxHttpClientResponse> getNow(String uri, MultiMap headers) {
final MemoizeHandler<RxHttpClientResponse,HttpClientResponse> rh=new MemoizeHandler<RxHttpClientResponse,HttpClientResponse>() {
@Override
public void handle(HttpClientResponse r) {
complete(new RxHttpClientResponse(r));
}
};
core.getNow(uri,headers,rh);
return Observable.create(rh.subscribe);
}
代码示例来源:origin: vert-x/mod-lang-php
/**
* Executes a GET request.
*/
public HttpClient getNow(Env env, StringValue uri, Value handler) {
PhpTypes.assertCallable(env, handler, "Argument to Vertx\\Http\\HttpClient::getNow() must be callable.");
client.getNow(uri.toString(), createResponseHandler(env, handler));
return this;
}
内容来源于网络,如有侵权,请联系作者删除!