mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-12 04:55:41 +00:00
[HTTPCLIENT-1220] Add DecompressingHttpClient#getHttpClient().
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1369844 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ccdebd9384
commit
de80f40ae9
@ -116,6 +116,15 @@ public HttpResponse execute(HttpUriRequest request) throws IOException,
|
||||
return execute(getHttpHost(request), request, (HttpContext)null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the HttpClient to issue request.
|
||||
*
|
||||
* @return the HttpClient to issue request
|
||||
*/
|
||||
public HttpClient getHttpClient() {
|
||||
return this.backend;
|
||||
}
|
||||
|
||||
HttpHost getHttpHost(HttpUriRequest request) {
|
||||
URI uri = request.getURI();
|
||||
return URIUtils.extractHost(uri);
|
||||
|
@ -80,6 +80,7 @@ public void canCreate() {
|
||||
handled = new Object();
|
||||
backend = new DummyHttpClient();
|
||||
impl = new DecompressingHttpClient(backend);
|
||||
assertEquals(backend, impl.getHttpClient());
|
||||
request = new HttpGet("http://localhost:8080");
|
||||
ctx = new BasicHttpContext();
|
||||
host = new HttpHost("www.example.com");
|
||||
|
Loading…
x
Reference in New Issue
Block a user