The representation of the contents/part of a request.
Get contents bytes.
var request = plugins.rest_ws.getRequest();
var contents = request.getContents();
if (contents.length > 0) {
var bytes = contents[0].getBytes();
}
Get contents content type.
var request = plugins.rest_ws.getRequest();
var contents = request.getContents();
if (contents.length > 0) {
var contentType = contents[0].getContentType();
}
Get contents field name.
var request = plugins.rest_ws.getRequest();
var contents = request.getContents();
if (contents.length > 0) {
var fieldName = contents[0].getFieldName();
}
Get contents name.
var request = plugins.rest_ws.getRequest();
var contents = request.getContents();
if (contents.length > 0) {
var name = contents[0].getName();
}
Get contents size.
var request = plugins.rest_ws.getRequest();
var contents = request.getContents();
if (contents.length > 0) {
var size = contents[0].getSize();
}
Get contents as string.
var request = plugins.rest_ws.getRequest();
var contents = request.getContents();
if (contents.length > 0) {
var string = contents[0].getString('UTF-8');
}