Android Volley gives me 400 error

后端 未结 12 2135
借酒劲吻你
借酒劲吻你 2020-12-11 00:28

I\'m trying to make a POST request to my API and it works in Postman (I get a valid JSON object), but not using Volley. With the follo

12条回答
  •  一向
    一向 (楼主)
    2020-12-11 01:13

    In Android 2.3 there is a problem using Base64.encodeToString() as it introduces a new line in HTTP header. See my response to this question here in SO.

    Short answer: Don't use Base64.encodeToString() but put the already encoded String there.

提交回复
热议问题