public class RestClient extends Client
Client.BytesHandler, Client.JsonHandler, Client.ResponseHandler<T>| Modifier and Type | Field and Description |
|---|---|
static String |
ACCEPT_TYPE_APPLICATION |
static String |
ACCEPT_TYPE_APPLICATION_JSON |
static String |
ACCEPT_TYPE_APPLICATION_OCTET_STREAM |
static String |
CHARSET_UTF_8 |
static String |
CONTENT_TYPE_APPLICATION_JSON |
static String |
ESL_ACCEPT_TYPE_APPLICATION |
static String |
ESL_ACCEPT_TYPE_APPLICATION_JSON |
static String |
ESL_ACCEPT_TYPE_APPLICATION_OCTET_STREAM |
static String |
ESL_API_USER_AGENT |
static String |
ESL_API_VERSION |
static String |
ESL_API_VERSION_HEADER |
static String |
ESL_CONTENT_TYPE_APPLICATION_JSON |
static String |
HEADER_CONTENT_DISPOSITION |
static String |
HEADER_CONTENT_TYPE |
static String |
HEADER_KEY_ACCEPT |
allowAllSSLCertificates, proxyConfiguration, support, useSystemProperties| Constructor and Description |
|---|
RestClient(ApiTokenConfig apiTokenConfig,
boolean allowAllSSLCertificates,
ProxyConfiguration proxyConfiguration,
boolean useSystemProperties,
Map<String,String> headers) |
RestClient(String apiKey) |
RestClient(String apiKey,
boolean allowAllSSLCertificates) |
RestClient(String apiKey,
boolean allowAllSSLCertificates,
ProxyConfiguration proxyConfiguration) |
RestClient(String apiKey,
boolean allowAllSSLCertificates,
ProxyConfiguration proxyConfiguration,
boolean useSystemProperties,
Map<String,String> headers) |
RestClient(String apiKey,
ProxyConfiguration proxyConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAuthorizationHeader(org.apache.http.client.methods.HttpUriRequest request) |
String |
delete(String path) |
String |
delete(String path,
String jsonPayload) |
String |
get(String path) |
String |
get(String path,
String acceptType) |
DownloadedFile<?> |
getBytes(String path) |
DownloadedFile<?> |
getBytes(String path,
String acceptType) |
DownloadedFile<?> |
getBytesAsOctetStream(String path) |
void |
patch(String path,
String jsonPayload) |
String |
post(String path,
String jsonPayload) |
String |
postMultipartFile(String path,
Map<String,byte[]> files) |
String |
postMultipartFile(String path,
Map<String,byte[]> files,
String jsonPayload) |
String |
postMultipartFile(String path,
String fileName,
byte[] fileBytes,
String jsonPayload) |
String |
postMultipartPackage(String path,
Collection<Document> documents,
String jsonPayload) |
String |
put(String path,
String jsonPayload) |
buildHttpClient, buildSSLSocketFactorypublic static final String CHARSET_UTF_8
public static final String ESL_API_VERSION
public static final String ESL_API_USER_AGENT
public static final String ESL_API_VERSION_HEADER
public static final String HEADER_CONTENT_TYPE
public static final String CONTENT_TYPE_APPLICATION_JSON
public static final String ESL_CONTENT_TYPE_APPLICATION_JSON
public static final String HEADER_KEY_ACCEPT
public static final String HEADER_CONTENT_DISPOSITION
public static final String ACCEPT_TYPE_APPLICATION_JSON
public static final String ACCEPT_TYPE_APPLICATION_OCTET_STREAM
public static final String ACCEPT_TYPE_APPLICATION
public static final String ESL_ACCEPT_TYPE_APPLICATION_JSON
public static final String ESL_ACCEPT_TYPE_APPLICATION_OCTET_STREAM
public static final String ESL_ACCEPT_TYPE_APPLICATION
public RestClient(String apiKey)
public RestClient(String apiKey, boolean allowAllSSLCertificates)
public RestClient(String apiKey, ProxyConfiguration proxyConfiguration)
public RestClient(String apiKey, boolean allowAllSSLCertificates, ProxyConfiguration proxyConfiguration)
public RestClient(String apiKey, boolean allowAllSSLCertificates, ProxyConfiguration proxyConfiguration, boolean useSystemProperties, Map<String,String> headers)
public RestClient(ApiTokenConfig apiTokenConfig, boolean allowAllSSLCertificates, ProxyConfiguration proxyConfiguration, boolean useSystemProperties, Map<String,String> headers)
public String post(String path, String jsonPayload) throws IOException, RequestException
IOExceptionRequestExceptionpublic String put(String path, String jsonPayload) throws IOException, RequestException
IOExceptionRequestExceptionpublic void patch(String path, String jsonPayload) throws IOException, RequestException
IOExceptionRequestExceptionpublic String postMultipartFile(String path, Map<String,byte[]> files, String jsonPayload) throws IOException, RequestException
IOExceptionRequestExceptionpublic String postMultipartFile(String path, Map<String,byte[]> files) throws IOException, RequestException
IOExceptionRequestExceptionpublic String postMultipartFile(String path, String fileName, byte[] fileBytes, String jsonPayload) throws IOException, RequestException
IOExceptionRequestExceptionpublic String postMultipartPackage(String path, Collection<Document> documents, String jsonPayload) throws IOException, RequestException
IOExceptionRequestExceptionprotected void addAuthorizationHeader(org.apache.http.client.methods.HttpUriRequest request)
public String get(String path) throws IOException, RequestException
IOExceptionRequestExceptionpublic String get(String path, String acceptType) throws IOException, RequestException
IOExceptionRequestExceptionpublic DownloadedFile<?> getBytes(String path) throws IOException, RequestException
IOExceptionRequestExceptionpublic DownloadedFile<?> getBytes(String path, String acceptType) throws IOException, RequestException
IOExceptionRequestExceptionpublic DownloadedFile<?> getBytesAsOctetStream(String path) throws IOException, RequestException
IOExceptionRequestExceptionpublic String delete(String path) throws IOException, RequestException
IOExceptionRequestExceptionpublic String delete(String path, String jsonPayload) throws IOException, RequestException
IOExceptionRequestExceptionCopyright 2022 OneSpan All rights reserved.