HttpApi (HTTP APIs)
Retrieve a json result using HTTP get.
HttpApi.get(String requestUrl)
or
HttpApi.get(String requestUrl, Map<String, String> headers)
Parameters
requestUrl: requested url
headers
Returns
result of the operation
HTTP Post with the body and optionally headers and retrieve returning object.
HttpApi.post(String requestUrl, Map<String, Object> body)
or
HttpApi.post(String requestUrl, Map<String, Object> body, Map<String, String> headers)
or
HttpApi.postAsString(String requestUrl, Object body)
or
HttpApi.postAsString(String requestUrl, Object body, Map<String, String> headers)
Parameters
requestUrl: requested URL
body: body of the request
headers: headers
Returns
the result of the operation
Execute HTTP put with a given body and a header to the requested URL.
HttpApi.put(String requestUrl, Map<String, Object> body)
or
HttpApi.put(String requestUrl, Map<String, Object> body, Map<String, String> headers)
Parameters
requestUrl: requested url
body: payload
headers: headers
Returns
result of the operation
Execute HTTP patch with the requested body and header to a URL.
HttpApi.patch(String requestUrl, Map<String, Object> body)
or
HttpApi.patch(String requestUrl, Map<String, Object> body, Map<String, String> headers)
Parameters
requestUrl: requested url
body: payload
headers: headers
Returns
the result of the operation
Execute HTTP delete with a body and a header to a requested URL.
HttpApi.delete(String requestUrl, Map<String, Object> body)
or
HttpApi.delete(String requestUrl, Map<String, Object> body, Map<String, String> headers)
Parameters
requestUrl: requested url
body: body of the request
headers: headers
Returns
the result of the operation
Description...
HttpApi.getAsString(String requestUrl)
or
HttpApi.getAsString(String requestUrl,
Map<String, String> headers)
requestUrl
headers
// Some code
Description...
HttpApi.postAsString(String requestUrl, Object body)
or
HttpApi.postAsString(String requestUrl, Object body,
Map<String, String> headers)
requestUrl
body
headers
// Some code
Description...
HttpApi.putAsString(String requestUrl, Object body)
or
HttpApi.putAsString(String requestUrl, Object body,
Map<String, String> headers)
requestUrl
body
headers
// Some code
Description...
HttpApi.patchAsString(String requestUrl, Object body)
or
HttpApi.patchAsString(String requestUrl, Object body,
Map<String, String> headers)
requestUrl
body
headers
// Some code
Description...
HttpApi.deleteAsString(String requestUrl, Object body)
or