我已经用curl尝试了下面的代码,但现在它可以工作了,请看一下,谢谢
功能:
Parse.Cloud.define('hello', function(req, res) {
res.success('Hello world!');
});卷曲URL:
curl -X POST -H "X-Parse-Application-Id: xxx" -H "X-Parse-REST-API-Key: xxx" [http][xxx]/parse/functions/hello错误:
Result: TypeError: Cannot call method 'runRequestListener' of undefined
at handleRequest (http.js:551:11)
at Parse.Cloud._runCustomEndpoint (<anonymous>:204:7)发布于 2016-08-22 21:48:17
明白了,
问题出在URL上。我以为URL是我们的域名,但它是一个解析API,如下所示,CURL请求工作正常。
curl -X POST -H "X-Parse-Application-Id: xxx" -H "X-Parse-REST-API-Key: xxx" [https][api.parse.com]/1/functions/hellohttps://stackoverflow.com/questions/39079519
复制相似问题