i building service app , requires multiple request, there common way combine services, have @ least 26 services on queue. here first two? preferred process guarantee error handling? set high timeouts each call? suggestion appreciated.
/* ////////////////////////////////////////////////////////////////////// objectivesgoals */ parse.cloud.httprequest({ method: 'get', url: serverdomain + '/classes/objectivesgoals', headers: { 'content-type': 'application/json', 'x-parse-application-id': appid, 'x-parse-rest-api-key': restid, 'x-parse-session-token': sessiontoken } }).then(function (httpresponse) { var createobjectives = json.parse(httpresponse.text); var objectives = createobjectives.results; constructpage(); response.success('hi again'); }, function (httpresponse) { console.error('request failed response code ' + httpresponse); }); /* ////////////////////////////////////////////////////////////////////// achievements */ parse.cloud.httprequest({ method: 'get', url: serverdomain + '/classes/achievements', headers: { 'content-type': 'application/json', 'x-parse-application-id': appid, 'x-parse-rest-api-key': restid, 'x-parse-session-token': sessiontoken } }).then(function (httpresponse) { var createachievements = json.parse(httpresponse.text); var achievements = createachievements.results; constructpage(); response.success('hi again'); }, function (httpresponse) { console.error('request failed response code ' + httpresponse); });
Comments
Post a Comment