public final class HttpClient extends Object implements Closeable
HttpClient(InetAddress, int)| Constructor and Description |
|---|
HttpClient(InetAddress address,
int port)
Connects to the given
address and port. |
HttpClient(String host,
int port) |
| Modifier and Type | Method and Description |
|---|---|
HttpResponse |
call(HttpRequest httpRequest)
Sends the given
httpRequest to the server, waits for the response from the server. |
void |
close() |
public HttpClient(String host, int port) throws IOException
IOExceptionHttpClient(InetAddress, int)public HttpClient(InetAddress address, int port) throws IOException
address and port.IOExceptionpublic HttpResponse call(HttpRequest httpRequest) throws IOException
httpRequest to the server, waits for the response from the server.IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2016 Arno Unkrig. All rights reserved.