Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var client = new RestClient("http://api.metrotel.com.bd/sms/2/text/single");
- var request = new RestRequest(Method.POST);
- request.AddHeader("accept", "application/json");
- request.AddHeader("content-type", "application/json");
- request.AddHeader("authorization", "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==");
- request.AddParameter("application/json", "{\"from\":\"8809612316267\", \"to\":\"8801786739367\",\"text\":\"Test SMS.\"}", ParameterType.RequestBody);
- IRestResponse response = client.Execute(request);
- // Here QWxhZGRpbjpvcGVuIHNlc2FtZQ== resemble base_64 encode of username:password
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement