Apr 19, 2024 17:18 Parameters Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Returns Supported Clients Sample Parameters Supported Clients SampleSupported Clients
SmartClient
WebClient
NGClient
Methods Summary
WsCookie
createCookie(name, value)
Create a http cookie.
WsRequest
getRequest()
Get the currently running REST-WS request.
WsResponse
getResponse()
Get the response for the currently running REST-WS request.
Boolean
isRunningRequest()
Check whether the client is currently running a REST-WS request.
void
sendResponseUserPropertiesHeaders(send)
Allow or block sending the user properties as response header values.
Methods Details
createCookie(name, value)
Create a http cookie.
The cookie name and value allows only a sequence of non-special, non-white space characters, see
the cookie spec https://tools.ietf.org/html/rfc2965
String
name
The name of the cookie
String
value
The value of the cookie
var cookie = plugins.rest_ws.createCookie('chocolate', 'chip');
var response = plugins.rest_ws.getResponse();
response.addCookie(cookie);
getRequest()
Get the currently running REST-WS request.
If the client is not currently running in REST-WS, an exception is thrown.
getResponse()
Get the response for the currently running REST-WS request.
If the client is not currently running in REST-WS, an exception is thrown.
var response = plugins.rest_ws.getResponse();
resp.setHeader("My-Custom-Header", "42");
isRunningRequest()
Check whether the client is currently running a REST-WS request.
If false, the rest-ws client-plugin features are not available.
sendResponseUserPropertiesHeaders(send)
Allow or block sending the user properties as response header values.
By default the response headers contain the user properties.
Boolean
send
;