HttpWebRequest C# example

39

HttpWebRequest C# example -

var values = new Dictionary<string, string>
  {
      { "thing1", "hello" },
      { "thing2", "world" }
  };

  var content = new FormUrlEncodedContent(values);

  var response = await client.PostAsync("http://www.example.com/recepticle.aspx", content);

  var responseString = await response.Content.ReadAsStringAsync();

Comments

Submit
0 Comments