string html = "";
using (WebClient webClient = new WebClient())
{
string address = "https://#.tk/index-post.php";
byte[] postData = Encoding.ASCII.GetBytes("name=wololo");
webClient.Headers[HttpRequestHeader.Accept] = "text/html, application/xhtml+xml, */*";
webClient.Headers[HttpRequestHeader.UserAgent] = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)";
webClient.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
webClient.UploadData(address, postData);
}
How can I get the HTML code from the page when it makes the request POST
?