we have a REST web services based on an Hana XSJS Project; at moment the steps that the WS perform are the following :
1) Parse the Body of the POST cal
2) Make some elaboration based on the input data
3) set the HTTP 200 Status
Example of AS IS :
$.response.contentType = "text/html";
var va_br = $.request.body.asString();
// -- PERFORM ELABORATION
$.Response = $.net.http.OK;
The problem is that the connection with the client is closed only when the XSJS process complete all the operation .
How to send the HTTP Code "200" and close the connection to the client whithout waiting the XSJS code is completed .
The flow will be :
1) Parse the Body of the POST call
2) Close the connection and send the HTTP 200 Status back to the client
3) Make some elaboration based on the input data
We tried to force the closing of the objects $.response or $.response without any result .
Message was edited by: Tom Flanagan