Skip to content

Instantly share code, notes, and snippets.

@alikrc
Last active August 29, 2015 14:15
Show Gist options
  • Save alikrc/4581c21491ee7ff4792b to your computer and use it in GitHub Desktop.
Save alikrc/4581c21491ee7ff4792b to your computer and use it in GitHub Desktop.
string URI = "http://www.site.com";
string myParameters = "param1=value1&param2=value2&param3=value3";
using (WebClient wc = new WebClient())
{
wc.Encoding = Encoding.UTF8;
wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
string htmlResult = wc.UploadString(URI, myParameters);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment