如何从Node.js调用PHP Web服务

我怎么能从node.js调用一个PHP的web服务。 提前致谢。

您可以使用node-httpclient执行获取请求到任何服务器,而不是necceserialy PHP。

var client = new httpcli.httpclient(); var url = "http://domain.com/get/bananas" client.perform(url, "GET", function(result) { // Result is the response of the server }, null);