public class WebClient extends Object implements Client<WebRequest,WebResponse>
WebClient class.
Constructor and Description |
---|
WebClient(boolean override) |
Modifier and Type | Method and Description |
---|---|
void |
close()
close
|
void |
connect(InetAddress address,
int port,
int timeout)
connect
|
WebResponse |
receiveBanner()
receiveBanner
|
WebResponse |
sendRequest(WebRequest request)
sendRequest
|
void |
setAuth(String userName,
String password) |
void |
setAuthPreemtive(boolean authPreemtive) |
void |
setPath(String path) |
void |
setQueryString(String queryString) |
void |
setSchema(String schema) |
void |
setUseHttpV1(boolean useHttpV1) |
void |
setUserAgent(String userAgent) |
void |
setVirtualHost(String virtualHost) |
public void connect(InetAddress address, int port, int timeout) throws IOException, Exception
Client
connect
connect
in interface Client<WebRequest,WebResponse>
address
- a InetAddress
object.port
- a int.timeout
- a int.IOException
- if any.Exception
- if any.public void close()
Client
close
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Client<WebRequest,WebResponse>
public WebResponse receiveBanner() throws IOException, Exception
Client
receiveBanner
receiveBanner
in interface Client<WebRequest,WebResponse>
IOException
- if any.Exception
- if any.public WebResponse sendRequest(WebRequest request) throws IOException, Exception
Client
sendRequest
sendRequest
in interface Client<WebRequest,WebResponse>
request
- a Request object.IOException
- if any.Exception
- if any.public void setPath(String path)
public void setQueryString(String queryString)
public void setSchema(String schema)
public void setUserAgent(String userAgent)
public void setVirtualHost(String virtualHost)
public void setUseHttpV1(boolean useHttpV1)
public void setAuthPreemtive(boolean authPreemtive)
Copyright © 2016. All rights reserved.