Hi colleagues,
I have an xsjs service, which i want that should be called using three different HTTP methods i.e. GET, POST, DELETE.
See the code:
switch ($.request.method){
case $.net.http.GET:
doGet();
break;
case $.net.http.POST:
doPost();
break;
case $.net.http.DELETE:
doDelete();
break;
default:
$.response.status = $.net.http.METHOD_NOT_ALLOWED;
When I call this service using GET/POST method it works fine. But when i call using DELETE method, it gives Method not allowed(405) error. Probably going into default case.
Can anybody help??
Thank you.
Regards,
Sanampreet Singh