I am trying to get json data from server with JS function (Ajax), but keep receiving 406 status.
In request header I have (among other):
GET /projects.json HTTP/1.1
Accept: application/json
Content-Type: application/json
And in response:
HTTP/1.1 406 Not Acceptable
Content-Type:application/json; charset=utf-8
So what else? I've set accept type but still couldn't get the data. Similarly, with php/curl I am getting the data as it should.