Package co.arago.hiro.client.rest
Class AuthenticatedAPIHandler.SendBodyAPIRequestConf<T extends AuthenticatedAPIHandler.SendBodyAPIRequestConf<T,R>,R>
- java.lang.Object
-
- co.arago.hiro.client.rest.AuthenticatedAPIHandler.APIRequestConf<T,R>
-
- co.arago.hiro.client.rest.AuthenticatedAPIHandler.SendBodyAPIRequestConf<T,R>
-
- Type Parameters:
T- The Builder typeR- The type of the result expected fromAuthenticatedAPIHandler.APIRequestConf.execute()
- Direct Known Subclasses:
AuthAPI.PostMeProfileCommand,AuthAPI.PutMePasswordCommand,GraphAPI.CreateEntityCommand,GraphAPI.PostTimeseriesCommand,GraphAPI.PostVerbCommand,GraphAPI.QueryBodyConf,GraphAPI.UpdateEntityCommand
- Enclosing class:
- AuthenticatedAPIHandler
public abstract static class AuthenticatedAPIHandler.SendBodyAPIRequestConf<T extends AuthenticatedAPIHandler.SendBodyAPIRequestConf<T,R>,R> extends AuthenticatedAPIHandler.APIRequestConf<T,R>
The basic configuration for all requests that are sending JSON data. Handle queries, headers and fragments.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringbody-
Fields inherited from class co.arago.hiro.client.rest.AuthenticatedAPIHandler.APIRequestConf
fragment, headers, httpRequestTimeout, maxRetries, path, query
-
-
Constructor Summary
Constructors Constructor Description SendBodyAPIRequestConf(java.lang.String... pathParts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TsetBody(java.lang.String body)Set the body as plain String.TsetJsonBodyFromMap(java.util.Map<java.lang.String,?> map)Convert the Map into a JSON body String.TsetJsonBodyFromMessage(JsonMessage jsonMessage)Convert the jsonMessage into a JSON body String.-
Methods inherited from class co.arago.hiro.client.rest.AuthenticatedAPIHandler.APIRequestConf
execute, self, setHttpHeaders, setHttpRequestTimeout, setMaxRetries, setUrlFragment, setUrlQuery
-
-
-
-
Method Detail
-
setJsonBodyFromMap
public T setJsonBodyFromMap(java.util.Map<java.lang.String,?> map)
Convert the Map into a JSON body String.- Parameters:
map- The map to convert.- Returns:
AuthenticatedAPIHandler.APIRequestConf.self().- Throws:
java.lang.IllegalArgumentException- When the map cannot be transformed to a Json String.
-
setJsonBodyFromMessage
public T setJsonBodyFromMessage(JsonMessage jsonMessage)
Convert the jsonMessage into a JSON body String.- Parameters:
jsonMessage- The jsonMessage to convert.- Returns:
AuthenticatedAPIHandler.APIRequestConf.self().- Throws:
java.lang.IllegalArgumentException- When the jsonMessage cannot be transformed to a Json String.
-
setBody
public T setBody(java.lang.String body)
Set the body as plain String.- Parameters:
body- The body to set.- Returns:
AuthenticatedAPIHandler.APIRequestConf.self()
-
-