var req = require('topsin.xmlhttprequest');
// req.timeout = 3000;
req.ontimeout = function() {
	req.abort();
}

req.onreadystatechange = function() {
	if (req.readyState === 'NONE') {
		print('OK');
	}
}

req.setRequestHeader('Content-Type', 'application/json');
req.open('POST','http://139.196.104.13:9181/api/TOPMES6_YDH_V6/leon/ydh-auto_process_submit',false);
req.send(JSON.stringify({
	workcenter_code:'003.02.01'
}));

print('status:' + req.status);
print('errorCode:' + req.errorCode);
print('responseText:' + req.responseText);
print('response:' + JSON.stringify(req.response));

