static void Main(string[] args) { string url = "https://popl21.sigplan.org/"; HttpWebRequestWrapper newHttpWebRequestWrapper = new HttpWebRequestWrapper(url, 100); newHttpWebRequestWrapper.GetRequestStreamAsync(); NameValueCollection nvc = new NameValueCollection(); newHttpWebRequestWrapper.WriteParameterAsync(nvc); string fileStreamName = "file"; Stream newfilestream = File.OpenRead(fileStreamName); newHttpWebRequestWrapper.WriteStreamAsync(newfilestream, fileStreamName); newHttpWebRequestWrapper.WriteEndBoundaryAsync(); }