Getting HTTP 406 in Android Webservice Call

后端 未结 3 536
被撕碎了的回忆
被撕碎了的回忆 2021-01-22 13:06

I\'m getting 406 when i invoke the rest web service via android application.Can any one suggest me what is the error in this code and why i am getting this error ??

R

3条回答
  •  离开以前
    2021-01-22 13:44

    That error is not acceptable.

    Literally.

    Here is some documentation on it:

    It generally means that the service sent stuff back to you in an unrecognizable format. It could be the wrong kind of data, or the headers could just be screwed up. You should try to use a packet sniffer like WireShark to see what is getting sent back. Also, it could be that you just need to specify the content type.

    If you are doing webservice calls, and you've never used a packet sniffer, it would be a great idea to figure out how to do it.

提交回复
热议问题