public class RequestOptions extends Object
HttpClient
will make connect to make a request.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_HOST
The default value for host name = "localhost"
|
static int |
DEFAULT_PORT
The default value for port = 80
|
static boolean |
DEFAULT_SSL
SSL enabled by default = false
|
static String |
DEFAULT_URI
The default relative request URI = ""
|
Constructor and Description |
---|
RequestOptions()
Default constructor
|
RequestOptions(JsonObject json)
Create options from JSON
|
RequestOptions(RequestOptions other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
String |
getHost()
Get the host name to be used by the client request.
|
int |
getPort()
Get the port to be used by the client request.
|
String |
getURI() |
boolean |
isSsl() |
RequestOptions |
setHost(String host)
Set the host name to be used by the client request.
|
RequestOptions |
setPort(int port)
Set the port to be used by the client request.
|
RequestOptions |
setSsl(boolean ssl)
Set whether SSL/TLS is enabled
|
RequestOptions |
setURI(String uri)
Set the request relative URI
|
public static final String DEFAULT_HOST
public static final int DEFAULT_PORT
public static final boolean DEFAULT_SSL
public static final String DEFAULT_URI
public RequestOptions()
public RequestOptions(RequestOptions other)
other
- the options to copypublic RequestOptions(JsonObject json)
json
- the JSONpublic String getHost()
public RequestOptions setHost(String host)
public int getPort()
public RequestOptions setPort(int port)
public boolean isSsl()
public RequestOptions setSsl(boolean ssl)
ssl
- true if enabledpublic String getURI()
public RequestOptions setURI(String uri)
uri
- the relative uriCopyright © 2017. All rights reserved.