public interface RequestExecutor
Modifier and Type | Interface and Description |
---|---|
static class |
RequestExecutor.ContentType |
static class |
RequestExecutor.Method |
Modifier and Type | Method and Description |
---|---|
java.io.ByteArrayOutputStream |
executeRequest(java.lang.String urlString,
ParamsMap params,
ApiDefinition apiDefinition)
Executes a request for a given URL Executes a request with given url and specifying the apiDefinition and some
parameters.
|
java.lang.String |
executeRequest(java.lang.String urlString,
ParamsMap params,
RequestExecutor.Method method)
Executes a request with given url, some params and a request method.
|
java.lang.String |
executeRequest(java.lang.String urlString,
ParamsMap params,
RequestExecutor.Method method,
RequestExecutor.ContentType contentTypeFormat)
Executes a request with given url and specifying the contentType, with some params and a request method.
|
java.lang.String |
executeRequest(java.lang.String urlString,
RequestExecutor.Method method)
Executes a request with given url and request method
|
java.lang.String |
executeRequest(java.lang.String urlString,
RequestExecutor.Method method,
RequestExecutor.ContentType contentTypeFormat)
Executes a request with given url and specifying the contentType, (without params) and a request method.
|
void |
setAuthorization(java.lang.String apiKey) |
void |
setAuthorization(java.lang.String username,
java.lang.String password)
Set the credentials required for the server authorization
|
void setAuthorization(java.lang.String apiKey)
void setAuthorization(java.lang.String username, java.lang.String password)
username
- password
- java.lang.String executeRequest(java.lang.String urlString, RequestExecutor.Method method) throws MambuApiException
urlString
- the url to execute on. eg: https://demo.mambu.com/api/clientsMambuApiException
java.lang.String executeRequest(java.lang.String urlString, ParamsMap params, RequestExecutor.Method method) throws MambuApiException
urlString
- the url to execute on. eg: https://demo.mambu.com/api/clientsmethod
- the method (e.g. GET or PUT)params
- the parameters eg: {clientId=id}MambuApiException
java.lang.String executeRequest(java.lang.String urlString, ParamsMap params, RequestExecutor.Method method, RequestExecutor.ContentType contentTypeFormat) throws MambuApiException
urlString
- the url to execute on. eg: https://demo.mambu.com/api/clientsmethod
- the method (e.g. GET or PUT)params
- the parameters eg: {clientId=id}, {JSON=jsonString}contentTypeFormat
- enum for the content type string (e.g WWW_FORM or JSON: will be using respectively the
"application/x-www-form-urlencoded; charset=UTF-8" or "application/json; charset=UTF-8";)MambuApiException
java.lang.String executeRequest(java.lang.String urlString, RequestExecutor.Method method, RequestExecutor.ContentType contentTypeFormat) throws MambuApiException
urlString
- the url to execute on. eg: https://demo.mambu.com/api/clientsmethod
- the method (e.g. GET or PUT)contentTypeFormat
- enum for the content type string (e.g WWW_FORM or JSON: will be using respectively the
"application/x-www-form-urlencoded; charset=UTF-8" or "application/json; charset=UTF-8";)MambuApiException
java.io.ByteArrayOutputStream executeRequest(java.lang.String urlString, ParamsMap params, ApiDefinition apiDefinition) throws MambuApiException
urlString
- the url to execute on. eg: https://demo.mambu.com/api/database/backup/LATESTparams
- the parameters eg: {clientId=id}, {JSON=jsonString}apiDefinition
- the ApiDefinition holding details like HTTP method, content type and API return typeMambuApiException