0

I am using angular application to run the application which uses ruby on rails backend apis. Our application works correctly on web desktop in different browsers but for mobile devices, I am getting 406 not acceptable errors for the same apis. Not getting a way to understand where is the problem in frontend code side or in backend api side.

Just to add the OPTIONS request is sent first on which I am getting this error.

Rahul Tailwal
  • 3,183
  • 3
  • 14
  • 27

1 Answers1

0

Your backend service is saying that the response type it is returning is not provided in the Accept HTTP header in your Client request.

Ref: http://en.wikipedia.org/wiki/List_of_HTTP_header_fields

Find out the response (content type) returned by Service. Provide this (content type) in your request Accept header. http://en.wikipedia.org/wiki/HTTP_status_code -> 406

What is "406-Not Acceptable Response" in HTTP?

safin chacko
  • 1,345
  • 1
  • 11
  • 18
  • request headers are same which works in web but not in mobile. To test in mobile i just use the browser mobile view and i can see the 406 error – Rahul Tailwal Jul 28 '17 at 10:50