原因是HttpWebRequest在默认情况下发出请求会添加“Expect: 100-Continue”请求头。
解决方案:
HttpWebRequest httpWebRequest= httpWebRequest = (HttpWebRequest)HttpWebRequest.Create(url);
httpWebRequest.ServicePoint.Expect100Continue = false;//指定此属性为false
本文共 288 字,大约阅读时间需要 1 分钟。
原因是HttpWebRequest在默认情况下发出请求会添加“Expect: 100-Continue”请求头。
解决方案:
HttpWebRequest httpWebRequest= httpWebRequest = (HttpWebRequest)HttpWebRequest.Create(url);
httpWebRequest.ServicePoint.Expect100Continue = false;//指定此属性为false
转载于:https://www.cnblogs.com/phcis/archive/2011/08/18/2144242.html