当我尝试地址栏上的以下链接 url 时,响应为“OK”
http://ww.exmaple.com.tr/webservices/addlead.php?first_name=" + r.Name + "&last_name=" + r.Surname + "&phone=" + r.Telephone + "&hash=" + r.HashCode
但是当我尝试像下面这样与 webclient 链接时,响应是“AUTH ERROR”
string URI = "http://ww.exmaple.com.tr/webservices/addlead.php";
string myParameters = "first_name=" + r.Name + "&last_name=" + r.Surname + "&phone=" + r.Telephone + "&hash=" + r.HashCode;
using (WebClient wc = new WebClient())
{
wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
string HtmlResult = wc.UploadString(URI, myParameters);
}
我怎么解决这个问题?