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++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -