HttpClient 在添加header 参数值有特殊符号 报System.FormatException
HttpClient 在添加header时,参数值有逗号时会报错
System.FormatException:“The format of value 'HMAC-SM3, AccessKey=TXXX,' is invalid.”
解决方式
HttpRequestMessage httpRequest = new HttpRequestMessage(HttpMethod.Post, postUrl);
httpRequest.Headers.TryAddWithoutValidation("authorization", "HMAC-SM3, AccessKey=TXXX");
参考文章
http://www.voidcn.com/article/p-gdawnluc-bst.html