Android Volley Post Request Header not changing

后端 未结 2 1392
温柔的废话
温柔的废话 2020-12-22 01:20

I am using Android Volley library to send POST request. And for POST request

  • Header is Content-Type:application/js
2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-22 01:48

    I found I had to override getBodyContentType() in order to get the Content-Type header to update correctly:

        public String getBodyContentType()
        {
            return "application/json; charset=utf-8";
        }
    

    Here is my question with some more details on this issue:

    • Volley Content-Type header not updating

提交回复
热议问题