Call (Consume) API using RestSharp in ASP.Net

on Jun 03, 2020 08:43 AM


i have this http code to send sms, how to call it on button click event please advice

var client = new RestClient(" & dlr - method = POST & dlr - url = &from = smsinfo & content = This is the sample content sent to test &to = 000000000");
var request = new RestRequest(Method.POST);
request.AlwaysMultipartFormData = true;
IRestResponse response = client.Execute(request);

 its gives lots of error.

Download FREE API for Word, Excel and PDF in ASP.Net: Download
on Jun 04, 2020 05:31 AM

The code uses RestSharp. Add RestSharp package in your project and import the namespaces.

For code implementation refer below links.