Android default charset when sending http post/put - Problems with special characters

后端 未结 4 1632

I have configured the apache httpClient like so:

HttpProtocolParams.setContentCharset(httpParameters, \"UTF-8\");
HttpProtocolParams.setHttpElementCharset(ht         


        
4条回答
  •  一向
    一向 (楼主)
    2020-12-08 09:05

    You can eliminate the server as the problem by using curl to send the same data. If it works with curl use --trace to check the output.

    Ensure you are sending the content body as bytes. Compare the HTTP request from Android with the output from the successful curl request.

提交回复
热议问题