Skip to content

Commit fa31633

Browse files
committed
MulitpartTextContent 取消编码处理
1 parent f565325 commit fa31633

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

WebApiClient/Internal/HttpContents/MulitpartTextContent.cs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class MulitpartTextContent : StringContent
1515
/// <param name="name">名称</param>
1616
/// <param name="value">文本</param>
1717
public MulitpartTextContent(string name, string value)
18-
: base(EncodingValue(value))
18+
: base(value == null ? string.Empty : value)
1919
{
2020
if (this.Headers.ContentDisposition == null)
2121
{
@@ -27,20 +27,5 @@ public MulitpartTextContent(string name, string value)
2727
}
2828
this.Headers.Remove("Content-Type");
2929
}
30-
31-
/// <summary>
32-
/// 对值进行编码
33-
/// </summary>
34-
/// <param name="value">值</param>
35-
/// <returns></returns>
36-
private static string EncodingValue(string value)
37-
{
38-
if (value == null)
39-
{
40-
return string.Empty;
41-
}
42-
return value;
43-
//return HttpUtility.UrlEncode(value, Encoding.UTF8);
44-
}
4530
}
4631
}

0 commit comments

Comments
 (0)