public class OssIndexHttpClient extends Object
| Constructor and Description |
|---|
OssIndexHttpClient() |
| Modifier and Type | Method and Description |
|---|---|
void |
addProxy(String protocol,
String host,
int port,
String username,
String password)
Add a proxy server through which to make requests
|
void |
addProxy(String protocol,
String host,
int port,
String username,
String password,
int socketTimeout,
int connectTimeout,
int connectionRequestTimeout)
Add a proxy server through which to make requests
|
static void |
main(String[] args) |
String |
performPostRequest(String requestString,
String data)
Perform the request with the given URL and JSON data.
|
void |
setCredentials(String user,
String token) |
public String performPostRequest(String requestString, String data) throws IOException
requestString - Server request relative URLdata - JSON data for the requestIOException - On query problemspublic void addProxy(String protocol, String host, int port, String username, String password)
public void addProxy(String protocol, String host, int port, String username, String password, int socketTimeout, int connectTimeout, int connectionRequestTimeout)
public static final void main(String[] args) throws IOException
IOExceptionCopyright © 2018. All rights reserved.