On my local version of the application, making the request with the following code, executes the code on the server, returning successfully.
$.ajax({
type: 'POST',
url: "{{=URL('default', 'serverFunction.json')}}",
data: {id: id}
}); However, if I make the request like so (without '.json' after serverFunction)
$.ajax({
type: 'POST',
url: "{{=URL('default', 'serverFunction')}}",
data: {id: id}
}); The server code executes, but returns a 404 error.
On the online version, it returns a 404 error in both cases, executing the server code.
Cross-posting from here: http://stackoverflow.com/questions/38870171/web2py-request-different-behavior-on-local-and-online-version-server-code-execu