in aliyun-net-credentials/Http/HttpRequest.cs [97:125]
public void SetHttpContent(byte[] content, string encoding, FormatType? format)
{
if (content == null)
{
contentType = null;
Content = null;
Encoding = null;
Headers.Remove("Content-MD5");
Headers.Remove("Content-Type");
Headers["Content-Length"] = "0";
return;
}
if (Method == MethodType.GET)
{
content = new byte[0];
}
Content = content;
Encoding = encoding;
string contentLen = content.Length.ToString();
string strMd5 = ParameterHelper.Md5SumAndBase64(content);
Headers["Content-MD5"] = strMd5;
Headers["Content-Length"] = contentLen;
if (format != null)
{
Headers["Content-Type"] = ParameterHelper.FormatTypeToString(format);
}
}