parse.com - Parse Cloud Function won't return response.success -


my cloud function calls web crawler i'm hosting , retrieves string back, can't response.success string app if string long (it works short strings reason). here code:

parse.cloud.define("search", function(request, response){     parse.cloud.usemasterkey();     parse.cloud.httprequest({         url: 'https://xxx.herokuapp.com/',         params: {             keyword: request.params.searchterm         },         success: function(httpresponse){             // httpresponse.text received reason             // not returned response.success             response.success(httpresponse.text);         }, error: function(httpresponse){             response.error(httpresponse);         }     }); }); 

i've been stuck on problem several days , appreciated.

i made stupid mistake, seems needed following when returning string app:

response.success(json.parse(httpresponse.text)); 

i'm not sure why needs done longer strings , doesn't seem matter short strings i'm sure there reason.


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -