Android: Volley HTTP Request custom header

前端 未结 3 981
有刺的猬
有刺的猬 2020-11-27 22:09

I\'m getting the following error when I run the app: BasicNetwork.performRequest: Unexpected response code 401

I need to pass an email, a password and a token to acc

3条回答
  •  隐瞒了意图╮
    2020-11-27 22:35

    The JsonObjectRequest is extended JsonRequest which override getBody() method directly, so your getParam() would never invoke, I recommend you extend StringRequest instead of JsonObjectRequest.

    your can check this answer for more details.

    by the way, you've another choice : Netroid, that based Volley, offered more features at all.

提交回复
热议问题