EasyStore
Posts: 0
Joined: Fri Jun 26, 2015 4:13 am

How I can speed up the response time of a rest service?

How I can speed up the response time of a rest service?
I have this problem:

GET http://181.48.98.134/WebSitePedidos/P... net::ERR_CONNECTION_TIMED_OUT

website response:
[{"idPedido": 4, "idCliente": "23333ee", "NombreCliente": "jaime", "subtotal": 500,
"total": 600}]

I send the values of the parameters as request, but the response time is very long

Please help me

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

How I can speed up the response time of a rest service?

Hello,

Do you use appery.io server code? You need improve your serverside, please check it.

EasyStore
Posts: 0
Joined: Fri Jun 26, 2015 4:13 am

How I can speed up the response time of a rest service?

I use this script in the server code

var responseBody = {},
requestParams = {},
paramKeys = request.keys();

for (var key = 0; key < paramKeys.length; key++) {
requestParams[paramKeys[key]] = request.get(paramKeys[key]);
}

//Note you need to change site url here.
var siteUrl = "http://181.48.98.134:80/WebSitePedido...";

var requestBody = "";
var XHRResponse = XHR.send("GET", siteUrl,
{
"status": "sent",
"headers": {
},
body: requestBody
}
);
console.log(XHRResponse);
console.log(XHRResponse.body);
responseBody = XHRResponse.body;
response.success(responseBody, "application/json");

But this is the result:

Error code SCSE018: Execution of the script has exceeded the allowed time and stopped

Please help me

EasyStore
Posts: 0
Joined: Fri Jun 26, 2015 4:13 am

How I can speed up the response time of a rest service?

Thanks Sergiy Kulibaba, I use the server code and working properly

Return to “Issues”