Checking in vendor folder for ease of using go get.
This commit is contained in:
parent
7a1251853b
commit
cdb4b5a1d0
3554 changed files with 1270116 additions and 0 deletions
23
vendor/git.apache.org/thrift.git/lib/nodejs/examples/httpClient.js
generated
vendored
Normal file
23
vendor/git.apache.org/thrift.git/lib/nodejs/examples/httpClient.js
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
var thrift = require('thrift');
|
||||
var helloSvc = require('./gen-nodejs/HelloSvc.js');
|
||||
|
||||
var options = {
|
||||
transport: thrift.TBufferedTransport,
|
||||
protocol: thrift.TJSONProtocol,
|
||||
path: "/hello",
|
||||
headers: {"Connection": "close"},
|
||||
https: false
|
||||
};
|
||||
|
||||
var connection = thrift.createHttpConnection("localhost", 9090, options);
|
||||
var client = thrift.createHttpClient(helloSvc, connection);
|
||||
|
||||
connection.on("error", function(err) {
|
||||
console.log("Error: " + err);
|
||||
});
|
||||
|
||||
client.hello_func(function(error, result) {
|
||||
console.log("Msg from server: " + result);
|
||||
});
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue