http 406 error on restful web service

2019-08-20 01:35发布

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:

enter image description here

Can you help me for solving this problem?

1条回答
Viruses.
2楼-- · 2019-08-20 02:21

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!

查看更多
登录 后发表回答