JavaScript API parameter properties
Each JavaScript API method takes an optional object as single parameter where each property is a cookie, header, path, query or form parameter as identified by their name, or the following special parameters: Warning The following special parameter names are subject to change. Table 44.1. API parameter properties Property name Default Description $entity The entity to send as a PUT, POST request. $contentType As determined by @Consumes. The MIME type of the body entity sent as the Content-Type header. $accepts Determined by @Provides, defaults to */*. The accepted MIME types sent as the Accept header. $callback Set to a function(httpCode, xmlHttpRequest, value) for an asynchronous call. If not present, the call will be synchronous and return the value. $apiURL Determined by container Set to the base URI of your JAX-RS endpoint, not including the last slash. $username If username and password are set, they will be used for credentials for the request. $password If username and password are set, they will be used for credentials for the request.