BasicNetwork.performRequest: Unexpected response code 500 for Volley

后端 未结 2 387
孤独总比滥情好
孤独总比滥情好 2021-01-24 00:10

i am trying to create a user login page, i am getting this error while i try to register.I guess there is a problem with the Json object part.I tried searching for other answers

相关标签:
2条回答
  • 2021-01-24 00:42

    myReq.setRetryPolicy(new DefaultRetryPolicy(10000, 0, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));

    Add this line before addidng your request in volley.

    This is the minimum number of retries. Default is 1, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT.

    0 讨论(0)
  • 2021-01-24 00:46

    add header Content-Type - text/html. I tried to call your api from postman rest client without headers it will give error 500 after adding header to api got result 200 status ok

    0 讨论(0)
提交回复
热议问题