本文整理了Java中org.apache.http.client.fluent.Response.<init>
方法的一些代码示例,展示了Response.<init>
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.<init>
方法的具体详情如下:
包路径:org.apache.http.client.fluent.Response
类名称:Response
方法名:<init>
暂无
代码示例来源:origin: org.apache.httpcomponents/fluent-hc
public Response execute() throws ClientProtocolException, IOException {
return new Response(internalExecute(Executor.CLIENT, null));
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.httpcomponents.httpclient
public Response execute() throws ClientProtocolException, IOException {
this.request.setConfig(this.configBuilder.build());
return new Response(Executor.CLIENT.execute(this.request));
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.httpcomponents.httpclient
/**
* Executes the request. Please Note that response content must be processed
* or discarded using {@link Response#discardContent()}, otherwise the
* connection used for the request might not be released to the pool.
*
* @see Response#handleResponse(org.apache.http.client.ResponseHandler)
* @see Response#discardContent()
*/
public Response execute(
final Request request) throws ClientProtocolException, IOException {
final HttpClientContext localContext = HttpClientContext.create();
localContext.setAttribute(HttpClientContext.CREDS_PROVIDER, this.credentialsProvider);
localContext.setAttribute(HttpClientContext.AUTH_CACHE, this.authCache);
localContext.setAttribute(HttpClientContext.COOKIE_STORE, this.cookieStore);
final InternalHttpRequest httprequest = request.prepareRequest();
return new Response(this.httpclient.execute(httprequest, localContext));
}
代码示例来源:origin: org.apache.httpcomponents/fluent-hc
/**
* Executes the request. Please Note that response content must be processed
* or discarded using {@link Response#discardContent()}, otherwise the
* connection used for the request might not be released to the pool.
*
* @see Response#handleResponse(org.apache.http.client.ResponseHandler)
* @see Response#discardContent()
*/
public Response execute(
final Request request) throws ClientProtocolException, IOException {
final HttpClientContext localContext = HttpClientContext.create();
if (this.credentialsProvider != null) {
localContext.setAttribute(HttpClientContext.CREDS_PROVIDER, this.credentialsProvider);
}
if (this.authCache != null) {
localContext.setAttribute(HttpClientContext.AUTH_CACHE, this.authCache);
}
if (this.cookieStore != null) {
localContext.setAttribute(HttpClientContext.COOKIE_STORE, this.cookieStore);
}
return new Response(request.internalExecute(this.httpclient, localContext));
}
内容来源于网络,如有侵权,请联系作者删除!