public class ApacheHttpClient extends Object implements HttpClient
Modifier and Type | Class and Description |
---|---|
static class |
ApacheHttpClient.Factory |
Constructor and Description |
---|
ApacheHttpClient(org.apache.http.client.HttpClient client,
URL url) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the connections associated with this client.
|
protected org.apache.http.protocol.HttpContext |
createContext() |
HttpResponse |
execute(HttpRequest request,
boolean followRedirects)
Executes the given request.
|
public ApacheHttpClient(org.apache.http.client.HttpClient client, URL url)
public HttpResponse execute(HttpRequest request, boolean followRedirects) throws IOException
HttpClient
execute
in interface HttpClient
request
- the request to execute.followRedirects
- whether to automatically follow redirects.IOException
- if an I/O error occurs.protected org.apache.http.protocol.HttpContext createContext()
public void close() throws IOException
HttpClient
close
in interface HttpClient
IOException
- if an I/O error occurs.Copyright © 2016. All rights reserved.