Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static async Task<string> post()
- {
- var client = new HttpClient();
- string postData = "This is a test that posts this string to a Web server.";
- var response = await client.PostAsync("http://www.contoso.com/PostAccepter.aspx ", new StringContent(postData));
- var content = await response.Content.ReadAsStringAsync();
- return content.ToString();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement