Getting HTTP 406 in Android Webservice Call

后端 未结 3 512
被撕碎了的回忆
被撕碎了的回忆 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

    406 is returned by the server when it can't respond based on accepting the request headers (ie they have an Accept header which states they only want XML). Check the Accept header in response from the server and send the data appropriately.

提交回复
热议问题