我正在尝试更改WebClient的标头,但它总是引发异常
The Content-Type header cannot be changed from its default value for this request
,我不知道如何解决。
我该如何解决?
//Webclient do the post to server.
WebClient wc = new WebClient();
//Header
wc.Headers["Content-Type"] = "application/x-www-form-urlencoded;charset=ISO-8859-1";