public class Api extends Object
| Modifier and Type | Field and Description |
|---|---|
org.apache.http.impl.client.CloseableHttpClient |
httpclient |
| Constructor and Description |
|---|
Api()
create http client
|
Api(String keyStorePath,
String keyStorePasswd,
String trustStorePath,
String trustStorePasswd)
create https client with root cert and client-key client-cert
|
| Modifier and Type | Method and Description |
|---|---|
String |
DoGet(Request request) |
String |
DoPost(Request request)
httpclient post
|
String |
DoPut(Request request)
httpclient put
|
String |
DoUploadFile(Request request,
String filename,
String poeid,
Boolean readonly)
httpclient post file
|
public Api(String keyStorePath, String keyStorePasswd, String trustStorePath, String trustStorePasswd) throws Exception
keyStorePath - keystore of client certkeyStorePasswd - password of client keystoretrustStorePath - keystore of server root certtrustStorePasswd - password of trustKeystoreExceptionCopyright © 2018. All rights reserved.