Hi all,
we have a REST web services based on an Hana XSJS Project.
The URL of call Http POST is as follows:
http://localhost:8080/Project/prova@xxxx.it/3.50/
We have problemswithreading parameters as there isthe presence of thecharacter @in the first parameterand the pointin the second.
The file .xsaccess has beenpopulatedin the following way:
{ "exposed": true,
"default_file" : "post_url.xsjs",
"authentication": {
"method": "Basic" },
"rewrite_rules" : [
{
"source": "/(\\w+)/(\\d+)/",
"target": "/post_url.xsjs?id=$1&poiid=$2"
} ]
}
while the file xsjs is as follows:
$.response.contentType = "text/html";
try{
if($.request.method === $.net.http.POST) {
var id = $.request.parameters.get("id");
var poid = $.request.parameters.get("poiid");
var output = id + poid ;
$.response.setBody(output);
$.Response = $.net.http.OK;}
} catch(e){
result = e.toString();
$.response.setBody(output + result);
}
How can I solve this issue ?
Thanks in advance,
Luigi