How to set content-length in android?

断了今生、忘了曾经 提交于 2019-11-28 14:36:00

You are using conn.setChunkedStreamingMode(100) that will effectively enable the chunked transfer encoding in chunks of 100 bytes when the content-lenght is unknown in advance.

Use conn.setFixedLengthStreamingMode(int len) if you know in advance the length of the content you are going to send in the body of the request.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!