HttpWebRequest以UTF-8编码写入内容时发生“Bytes to be written to the stream exceed the Content-Length bytes size
出错代码如下:
request.ContentLength
=
Encoding.UTF8.GetByteCount(content); var writer
=
new
StreamWriter(request.GetRequestStream(), Encoding.UTF8); writer.Write(content