Core
Framework v2.x
2

getSearchBody #

Available since 2.11.0

Returns the search body.

In the HTTP protocol, the search body will be extracted depending on the verb:

  • GET: extract the searchBody query string argument and parse it
  • POST: return the request body

Typically the search body contains keywords used by Kuzzle to perform queries like query, sort, aggregations etc.

Arguments #

Copied to clipboard!
getSearchBody (): JSONObject

Example #

Copied to clipboard!
const searchBody = request.getSearchBody();