I use Backbone, PHP (5.6) and Apache (2.4).
Problem: When sending data using Backbone model.save (), the $ _POST array is empty on the server.
I know of various ways to fix this.
Client method: . Backbone.emulateJSON - true or change the source of the baseline.
Server-side method: reading the original body instead of $ _POST.
They work, but they feel like hacks, and in fact they turn out to be a little uncomfortable.
Also, the Backbone doc says:
If you are working with an outdated web server that cannot handle requests encoded as application / json, setting Backbone.emulateJSON = true; [fix].
So this seems like a server issue. How to make my server inapplicable?
source
share