Maybe to add: so what you can do is the following URL:
url: '//177.77.88.88/api/v2/order?n1=' + scriptname + '&n2=' + user,
And pick this up on the server side (e.g. V8js)
//input variables
var params = event.request.parameters;
var procedure = params.n1;
var user = params.n2;
if (procedure === "confirm") {
//do something
} else {
//do something else
}
return "something";
But I would personally create multiple scripts and just call these. It makes it easier I would say, unless there are many functions you want to reuse and you don't want to call scripts on the server side.