| Constructor and Description |
|---|
ProxyNative(String url) |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
createDataStream(Map<String,?> data) |
protected byte[] |
createMultipartDataStream(String boundary,
Map<String,?> data,
Map<String,InputStream> files) |
protected String |
createQueryString(Map<String,?> data) |
protected URL |
createUrl(String httpMethod,
String endpoint,
Map<String,?> data) |
protected String |
encodeUrlParam(String s) |
String |
execute(String endpoint,
Map<String,String> data,
Map<String,InputStream> files,
String httpMethod,
AuthenticationStrategy authenticationStrategy)
Execute
Disable ssl hostname verification
HttpsURLConnection.setDefaultHostnameVerifier(new javax.net.ssl.HostnameVerifier() {
public boolean verify(StringUtils hostname, javax.net.ssl.SSLSession sslSession) {
return true;
}
});
|
public ProxyNative(String url)
public String execute(String endpoint, Map<String,String> data, Map<String,InputStream> files, String httpMethod, AuthenticationStrategy authenticationStrategy) throws Exception
HttpsURLConnection.setDefaultHostnameVerifier(new javax.net.ssl.HostnameVerifier() {
public boolean verify(StringUtils hostname, javax.net.ssl.SSLSession sslSession) {
return true;
}
});
protected URL createUrl(String httpMethod, String endpoint, Map<String,?> data) throws UnsupportedEncodingException, MalformedURLException
protected String createQueryString(Map<String,?> data) throws UnsupportedEncodingException
UnsupportedEncodingExceptionprotected byte[] createDataStream(Map<String,?> data) throws IOException
IOExceptionprotected byte[] createMultipartDataStream(String boundary, Map<String,?> data, Map<String,InputStream> files) throws IOException
IOExceptionprotected String encodeUrlParam(String s) throws UnsupportedEncodingException
UnsupportedEncodingExceptionCopyright © 2024. All rights reserved.