[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 class DecompressingHttpClient implements HttpClient {
|
|||
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 class TestDecompressingHttpClient {
|
|||
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…
Reference in New Issue