restler

Multiple responses on node.js restler call

ⅰ亾dé卋堺 提交于 2019-12-03 17:41:52
问题 I've created a library for sending REST requests: var rest = require('restler'); module.exports = { beginSession: function() { var options = { method: "GET", query: {begin_session: '1'}}; rest.get('http://countly/i', options). on('complete', function(data, response){ console.log('Status: ' + response.statusCode); }); } }; The problem is that every time I use the library and the call is responded, the 'on complete' is called multiple times: 1st use of method will call 'on complete' just once,

Restler always returns not found

允我心安 提交于 2019-12-01 06:47:59
I'm stuck here, in wamp I run everything and works fine, however, when I tried to install my api in a centos box, I always get a "Not Found" error. I dont know what else to do! Even the say/hello example fails... Is there any specification of the apache requirements to handle restler? Any ideas?, it is kind of urgent say.php: <?php class Say { function hello($to='world') { return "Hello $to!"; } } index.php <?php require_once 'restler/restler.php'; require_once 'say.php'; $r = new Restler(); $r->addAPIClass('Say'); $r->setSupportedFormats('jsonpformat', 'jsonformat', 'xmlformat', 'yamlformat')

Restler always returns not found

廉价感情. 提交于 2019-12-01 05:29:21
问题 I'm stuck here, in wamp I run everything and works fine, however, when I tried to install my api in a centos box, I always get a "Not Found" error. I dont know what else to do! Even the say/hello example fails... Is there any specification of the apache requirements to handle restler? Any ideas?, it is kind of urgent say.php: <?php class Say { function hello($to='world') { return "Hello $to!"; } } index.php <?php require_once 'restler/restler.php'; require_once 'say.php'; $r = new Restler();