public class RestClient extends Object implements IRestClient
| Modifier and Type | Class and Description |
|---|---|
static class |
RestClient.TrustAllX509TrustManager |
| Constructor and Description |
|---|
RestClient(String url,
String apiKey,
String applicationName) |
RestClient(String url,
String apiKey,
String applicationName,
boolean trustAll) |
| Modifier and Type | Method and Description |
|---|---|
String |
delete(String endpoint,
com.absio.broker.mapper.ICustomHeaderWork headerWork)
Executes an HTTP DELETE to the specified endpoint.
|
String |
get(String endpoint,
com.absio.broker.mapper.ICustomHeaderWork headerWork)
Executes an HTTP GET to the specified endpoint.
|
byte[] |
getFromUrl(String url,
com.absio.broker.mapper.ICustomHeaderWork headerWork)
Executes an HTTP GET to the specified URL and returns the byte data.
|
String |
post(String endpoint,
String content,
com.absio.broker.mapper.ICustomHeaderWork headerWork)
Executes an HTTP POST to the specified endpoint with a content payload.
|
String |
put(String endpoint,
String content,
com.absio.broker.mapper.ICustomHeaderWork headerWork)
Executes an HTTP PUT to the specified endpoint with a content payload.
|
String |
putToUrl(String url,
byte[] data,
com.absio.broker.mapper.ICustomHeaderWork headerWork)
Executes an HTTP PUT to the specified URL with a data content payload.
|
static SSLContext |
sslContext(KeyManager[] keyManagers,
TrustManager[] trustManagers) |
public static SSLContext sslContext(KeyManager[] keyManagers, TrustManager[] trustManagers)
public String delete(String endpoint, com.absio.broker.mapper.ICustomHeaderWork headerWork) throws IOException, BrokerException, InterruptedException
IRestClientdelete in interface IRestClientendpoint - The URL endpointheaderWork - Custom HTTP headersIOException - Thrown if a general IO error occurs while connecting to the serverBrokerException - Thrown if the Absio Broker™ application returns an errorInterruptedException - thrown when there is an interruption during rate limitingpublic String get(String endpoint, com.absio.broker.mapper.ICustomHeaderWork headerWork) throws IOException, BrokerException, InterruptedException
IRestClientget in interface IRestClientendpoint - The URL endpointheaderWork - Custom HTTP headersIOException - Thrown if a general IO error occurs while connecting to the serverBrokerException - Thrown if the Absio Broker™ application returns an errorInterruptedException - thrown when there is an interruption during rate limitingpublic byte[] getFromUrl(String url, com.absio.broker.mapper.ICustomHeaderWork headerWork) throws IOException, BrokerException, InterruptedException
IRestClient
NOTE: This method requires a full URL and not an endpoint like the other IRestClient methods.
getFromUrl in interface IRestClienturl - The URLheaderWork - Custom HTTP headersIOException - Thrown if a general IO error occurs while connecting to the serverBrokerException - Thrown if the Absio Broker™ application returns an errorInterruptedException - thrown when there is an interruption during rate limitingpublic String post(String endpoint, String content, com.absio.broker.mapper.ICustomHeaderWork headerWork) throws IOException, BrokerException, InterruptedException
IRestClientpost in interface IRestClientendpoint - The URL endpointcontent - The content payloadheaderWork - Custom HTTP headersIOException - Thrown if a general IO error occurs while connecting to the serverBrokerException - Thrown if the Absio Broker™ application returns an errorInterruptedException - thrown when there is an interruption during rate limitingpublic String put(String endpoint, String content, com.absio.broker.mapper.ICustomHeaderWork headerWork) throws IOException, BrokerException, InterruptedException
IRestClientput in interface IRestClientendpoint - The URL endpointcontent - The content payloadheaderWork - Custom HTTP headersIOException - Thrown if a general IO error occurs while connecting to the serverBrokerException - Thrown if the Absio Broker™ application returns an errorInterruptedException - thrown when there is an interruption during rate limitingpublic String putToUrl(String url, byte[] data, com.absio.broker.mapper.ICustomHeaderWork headerWork) throws IOException, BrokerException, InterruptedException
IRestClient
NOTE: This method requires a full URL and not an endpoint like the other IRestClient methods.
putToUrl in interface IRestClienturl - The fully-qualified URLdata - The content payloadheaderWork - Custom HTTP headersIOException - Thrown if a general IO error occurs while connecting to the serverBrokerException - Thrown if the Absio Broker™ application returns an errorInterruptedException - thrown when there is an interruption during rate limitingCopyright © 2021. All rights reserved.