I will add my problem in this discussion, because the title seems appropriate.
I’m trying to create an xsjs file. I did it, but when I try to access it I get an empty response with ok status (200). No matter what I try, it’s the same. Finally, my xsjs file is just:
$.response.setBody( "Failed to retreive data" );
$.response.status = $.net.http.INTERNAL_SERVER_ERROR;
But still I get 200. Apparently the service is somewhat reachable, because I don’t get 404. Even more strange. I’ve changed one of the existing xsjs files, which WAS WORKING and after that it started to act the same way – empty response. Then I’ve REVERTED the change, but … I’m still getting an empty response. Now this service is not working anymore. It’s good that I didn’t break the whole app (uh-oh). When I copy and paste the code from some working service into a new xsjs file I get the same – happy, empty, stupid, dummy 200 response. Now, I’m afraid to experiment with the existing services, because I might break them too.
Can someone help?