Skip to content

Instantly share code, notes, and snippets.

@xperimental
Created November 30, 2009 23:18
Show Gist options
  • Save xperimental/245870 to your computer and use it in GitHub Desktop.
Save xperimental/245870 to your computer and use it in GitHub Desktop.
WebRequest request = WebRequest.Create(PostUrl);
request.Method = "POST";
request.ContentLength = data.Length;
request.ContentType = "application/x-www-form-urlencoded";
Stream dataStream = request.GetRequestStream();
dataStream.Write(data, 0, data.Length);
dataStream.Close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment