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