Class JsonRequest
java.lang.Object
io.helidon.integrations.common.rest.ApiJsonBuilder<JsonRequest>
io.helidon.integrations.common.rest.ApiJsonRequest<JsonRequest>
io.helidon.integrations.common.rest.JsonRequest
- All Implemented Interfaces:
ApiRequest<JsonRequest>
Implementation of a
ApiRequest
that allows
free configuration of the JSON object.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionAdd custom boolean to payload.Add custom double to payload.Add custom int to payload.Add custom long to payload.add
(String name, ApiJsonBuilder<?> object) Add a custom object to payload.Add custom string to payload.addBase64
(String name, Base64Value base64Value) Add a string encoded with base64.addToArray
(String name, boolean element) Add an element to an array.addToArray
(String name, double element) Add an element to an array.addToArray
(String name, int element) Add an element to an array.addToArray
(String name, long element) Add an element to an array.addToArray
(String name, ApiJsonBuilder<?> element) Add an object to an array.addToArray
(String name, String element) Add an element to an array.addToObject
(String name, String key, boolean value) Add a key/value pair to a named object.addToObject
(String name, String key, double value) Add a key/value pair to a named object.addToObject
(String name, String key, int value) Add a key/value pair to a named object.addToObject
(String name, String key, long value) Add a key/value pair to a named object.addToObject
(String name, String key, String value) Add a key/value pair to a named object.static JsonRequest
builder()
Create a new request builder.emptyArray
(String name) Configure an empty array.Methods inherited from class io.helidon.integrations.common.rest.ApiJsonRequest
addHeader, addQueryParam, headers, queryParams, requestId, requestId, requestMediaType, requestMediaType, responseMediaType, responseMediaType
Methods inherited from class io.helidon.integrations.common.rest.ApiJsonBuilder
me, postBuild, preBuild, toJson
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.helidon.integrations.common.rest.ApiRequest
toJson
-
Method Details
-
builder
Create a new request builder.- Returns:
- request builder
-
addToArray
Description copied from class:ApiJsonBuilder
Add an element to an array.- Overrides:
addToArray
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- key in the json payloadelement
- element of the array- Returns:
- updated request
-
add
Description copied from class:ApiJsonBuilder
Add custom string to payload. If such a name is already added, it will be replaced.- Overrides:
add
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- json keyvalue
- json String value- Returns:
- updated request
-
add
Description copied from class:ApiJsonBuilder
Add custom int to payload. If such a name is already added, it will be replaced.- Overrides:
add
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- json keyvalue
- json value- Returns:
- updated request
-
add
Description copied from class:ApiJsonBuilder
Add custom double to payload. If such a name is already added, it will be replaced.- Overrides:
add
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- json keyvalue
- json value- Returns:
- updated request
-
add
Description copied from class:ApiJsonBuilder
Add custom boolean to payload. If such a name is already added, it will be replaced.- Overrides:
add
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- json keyvalue
- json value- Returns:
- updated request
-
emptyArray
Description copied from class:ApiJsonBuilder
Configure an empty array.- Overrides:
emptyArray
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- name of the property- Returns:
- updated builder
-
addToArray
Description copied from class:ApiJsonBuilder
Add an object to an array.- Overrides:
addToArray
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- name of the nested propertyelement
- aApiJsonBuilder
of the element of the array- Returns:
- updated builder
-
addToObject
Description copied from class:ApiJsonBuilder
Add a key/value pair to a named object.- Overrides:
addToObject
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- name of the object to create under the rootkey
- key of the nested propertyvalue
- value of the nested property- Returns:
- updated builder
-
addToArray
Description copied from class:ApiJsonBuilder
Add an element to an array.- Overrides:
addToArray
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- key in the json payloadelement
- element of the array- Returns:
- updated request
-
addToArray
Description copied from class:ApiJsonBuilder
Add an element to an array.- Overrides:
addToArray
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- key in the json payloadelement
- element of the array- Returns:
- updated request
-
addToArray
Description copied from class:ApiJsonBuilder
Add an element to an array.- Overrides:
addToArray
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- key in the json payloadelement
- element of the array- Returns:
- updated request
-
addToArray
Description copied from class:ApiJsonBuilder
Add an element to an array.- Overrides:
addToArray
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- key in the json payloadelement
- element of the array- Returns:
- updated request
-
add
Description copied from class:ApiJsonBuilder
Add custom long to payload. If such a name is already added, it will be replaced.- Overrides:
add
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- json keyvalue
- json value- Returns:
- updated request
-
addToObject
Description copied from class:ApiJsonBuilder
Add a key/value pair to a named object.- Overrides:
addToObject
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- name of the object to create under the rootkey
- key of the nested propertyvalue
- value of the nested property- Returns:
- updated builder
-
addToObject
Description copied from class:ApiJsonBuilder
Add a key/value pair to a named object.- Overrides:
addToObject
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- name of the object to create under the rootkey
- key of the nested propertyvalue
- value of the nested property- Returns:
- updated builder
-
addToObject
Description copied from class:ApiJsonBuilder
Add a key/value pair to a named object.- Overrides:
addToObject
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- name of the object to create under the rootkey
- key of the nested propertyvalue
- value of the nested property- Returns:
- updated builder
-
addToObject
Description copied from class:ApiJsonBuilder
Add a key/value pair to a named object.- Overrides:
addToObject
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- name of the object to create under the rootkey
- key of the nested propertyvalue
- value of the nested property- Returns:
- updated builder
-
add
Description copied from class:ApiJsonBuilder
Add a custom object to payload.- Overrides:
add
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- json keyobject
- json value- Returns:
- updated request
-
addBase64
Description copied from class:ApiJsonBuilder
Add a string encoded with base64.- Overrides:
addBase64
in classApiJsonBuilder<JsonRequest>
- Parameters:
name
- json keybase64Value
- base64 data- Returns:
- updated request
-