]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/thrift/lib/nodejs/examples/httpClient.js
buildsys: switch source download to quincy
[ceph.git] / ceph / src / jaegertracing / thrift / lib / nodejs / examples / httpClient.js
CommitLineData
f67539c2
TL
1var thrift = require('thrift');
2var helloSvc = require('./gen-nodejs/HelloSvc.js');
3
4var options = {
5 transport: thrift.TBufferedTransport,
6 protocol: thrift.TJSONProtocol,
7 path: "/hello",
8 headers: {"Connection": "close"},
9 https: false
10};
11
12var connection = thrift.createHttpConnection("localhost", 9090, options);
13var client = thrift.createHttpClient(helloSvc, connection);
14
15connection.on("error", function(err) {
16 console.log("Error: " + err);
17});
18
19client.hello_func(function(error, result) {
20 console.log("Msg from server: " + result);
21});
22
23