public static class Http { public static byte[] Post(string uri, NameValueCollection pairs) { byte[] response = null; using (WebClient client = new WebClient()) { response = client.UploadValues(uri, pairs); } return response; } }
var response = Http.Post("https://ca-test.com/login.shtml", new NameValueCollection() { { "j_account", "XXXX" }, { "j_username", "XXXX" }, { "j_password", "XXXX" }, });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)