http 406 error on restful web service

喜夏-厌秋 提交于 2020-01-07 02:22:08

问题


I have Spring MVC + JAXB web service and Flex client. I am getting HTTP 406 error when using RestFUL API. Here is request and response headers on image:

Can you help me for solving this problem?


回答1:


This problem comes when the data returned from the server is not in the format that is excepted by the browser. Also this can be caused by any one of the following:

  • Accept: The MIME types accepted by the browser. For example, HTML files, GIF files etc.
  • Accept-Charset: The character sets accepted by the client, e.g. utf-8, iso-8859-1 etc.
  • Accept-Encoding: The data encoding accepted by the client e.g. the file formats it understands, e.g. gzip.
  • Accept-Language: The natural languages (English, German etc.) accepted by the client.

Check what the server is returning and fix the problem!



来源:https://stackoverflow.com/questions/8404301/http-406-error-on-restful-web-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!