T
- the RuntimePlatform
subclass containing this RestPostAction
public abstract class RestPostAction<T extends RuntimePlatform> extends RestAction<T>
This class extends the generic RestAction
and provides an utility constructor to create POST request.
RestAction.MethodKind
headers, jsonContent, method, params, restEndpoint
runtimePlatform, session
Constructor and Description |
---|
RestPostAction(T runtimePlatform,
XatkitSession session,
Map<String,String> headers,
String restEndpoint,
Map<String,Object> params,
com.google.gson.JsonElement jsonContent)
Constructs a new
RestPostAction . |
compute, getJsonBody, getStringBody, handleResponse
call, getSession, init
public RestPostAction(T runtimePlatform, XatkitSession session, Map<String,String> headers, String restEndpoint, Map<String,Object> params, com.google.gson.JsonElement jsonContent)
RestPostAction
.
This method doesn't perform the REST API request, this is done asynchronously in the RestAction.compute()
method.
runtimePlatform
- the RuntimePlatform
containing this actionsession
- the XatkitSession
associated to this actionheaders
- the Map
of user-defined headers to include in the requestrestEndpoint
- the REST API endpoint to requestparams
- the Map
of user-defined parameters to include in the requestjsonContent
- the JsonElement
to include in the request's bodyNullPointerException
- if the provided runtimePlatform
or session
is null
IllegalArgumentException
- if the provided restEndpoint
is null
or empty
Copyright © 2020 SOM Research Lab. All rights reserved.