public final class OkApacheClient extends Object implements HttpClient
HttpClient
API using OkHttpClient
.
Warning: Many core features of Apache HTTP client are not implemented by this API. This includes the keep-alive strategy, cookie store, credentials provider, route planner and others.
Constructor and Description |
---|
OkApacheClient() |
OkApacheClient(OkHttpClient client) |
Modifier and Type | Method and Description |
---|---|
HttpResponse |
execute(HttpHost host,
HttpRequest request) |
HttpResponse |
execute(HttpHost host,
HttpRequest request,
HttpContext context) |
<T> T |
execute(HttpHost host,
HttpRequest request,
ResponseHandler<? extends T> handler) |
<T> T |
execute(HttpHost host,
HttpRequest request,
ResponseHandler<? extends T> handler,
HttpContext context) |
HttpResponse |
execute(HttpUriRequest request) |
HttpResponse |
execute(HttpUriRequest request,
HttpContext context) |
<T> T |
execute(HttpUriRequest request,
ResponseHandler<? extends T> handler) |
<T> T |
execute(HttpUriRequest request,
ResponseHandler<? extends T> handler,
HttpContext context) |
ClientConnectionManager |
getConnectionManager() |
HttpParams |
getParams() |
public OkApacheClient()
public OkApacheClient(OkHttpClient client)
public HttpParams getParams()
getParams
in interface HttpClient
public ClientConnectionManager getConnectionManager()
getConnectionManager
in interface HttpClient
public HttpResponse execute(HttpUriRequest request) throws IOException
execute
in interface HttpClient
IOException
public HttpResponse execute(HttpUriRequest request, HttpContext context) throws IOException
execute
in interface HttpClient
IOException
public HttpResponse execute(HttpHost host, HttpRequest request) throws IOException
execute
in interface HttpClient
IOException
public HttpResponse execute(HttpHost host, HttpRequest request, HttpContext context) throws IOException
execute
in interface HttpClient
IOException
public <T> T execute(HttpUriRequest request, ResponseHandler<? extends T> handler) throws IOException
execute
in interface HttpClient
IOException
public <T> T execute(HttpUriRequest request, ResponseHandler<? extends T> handler, HttpContext context) throws IOException
execute
in interface HttpClient
IOException
public <T> T execute(HttpHost host, HttpRequest request, ResponseHandler<? extends T> handler) throws IOException
execute
in interface HttpClient
IOException
public <T> T execute(HttpHost host, HttpRequest request, ResponseHandler<? extends T> handler, HttpContext context) throws IOException
execute
in interface HttpClient
IOException
Copyright © 2016. All Rights Reserved.