artdaq_node_server  v1_00_08
 All Classes Namespaces Files Variables Pages
client.js
1 var Client = require('../lib/client')
2 var http = require('http')
3 
4 var options = { host: 'localhost', port: 9994, path: '/', method: 'POST' }
5 var chunk1 = '<?xml version="1.0" encoding="UTF-8"?>'
6  + '<methodCall>'
7  + '<methodName>testMethod</methodName>'
8  + '<params>'
9  + '<param>'
10  + '<value><string>Param A</string></value>'
11  + '</param>'
12  + '<param>'
13  + '<value><string>Param B</string></value>'
14  + '</param>'
15  + '</params>'
16  + '</methodCall>';
17 
18 var req = http.request(options, function(res) {
19  setTimeout(function () { console.log('too late'); }, 5000)
20 })
21 
22 req.on('error', function(e) {
23 //do nothing
24 })
25 req.write(chunk1);
26 req.end();
27 //setTimeout(function () { req.abort(); }, 10)
28