how to post data to specific URL using WebClient in C# - Stack Overflow
string URI ="http://www.myurl.com/post.php";
string myParameters ="param1=value1¶m2=value2¶m3=value3";using (WebClient wc =newWebClient())
{
wc.Headers[HttpRequestHeader.ContentType]="application/x-www-form-urlencoded";
stringHtmlResult= wc.UploadString(URI, myParameters);
}
No comments:
Post a Comment