0

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.

daevon
  • 17
  • 7
  • This question/rep might help you: http://stackoverflow.com/questions/14251851/what-is-406-not-acceptable-response-in-http – Florian Oct 27 '15 at 13:02
  • It helped me so far as I added 'Accept' field in request. But server still respond with 406. – daevon Oct 27 '15 at 15:46

0 Answers0