// پیش نیاز ها using System; using System.Collections.Specialized; using System.Net; // کلاس ارسال درخواست 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("http://sms321.ir/webservice/rest/sms_send?", new NameValueCollection() { {"login_username", "USERNAME" }, {"login_password", "PASSWORD"}, { "receiver_number", "09132677411"}, { "note_arr[]", "سلام"}, { "sender_number", "10007666"} });