SDK Java v2.x

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

setHeaders #

This is a helper function returning itself, allowing to easily chain calls.

setHeaders(content, [replace]) #

Arguments Type Description
content JSON Object New content
replace boolean true: replace the current content with the provided data, false: merge it

Note: by default, the replace argument is set to false

Return value #

Returns this CollectionMapping object to allow chaining.

Usage #

Copied to clipboard!
JSONObject headers = new JSONObject();
headers.put("someContent", "someValue");
dataMapping.setHeaders(headers, true);