I'm using Backbone, PHP(5.6) and Apache(2.4).
Problem: When posting data using Backbone's model.save() the $_POST array is empty on the server.
I know about different ways to fix this.
Client way: setting Backbone.emulateJSON to true or changing the Backbone source.
Server way: reading raw body instead of $_POST.
These work but they feel like hacks and in fact they end up being a bit inconvenient.
Also, Backbone's doc says:
If you're working with a legacy web server that can't handle requests encoded as application/json, setting Backbone.emulateJSON = true; will [fix it].
So it sounds like a server problem. How do I make my server non-legacy?