Pramod Thakur

Pramod Thakur

  • 247
  • 6.8k
  • 2.2m

Posting with multiple parameters to webapi using RestSharp

Mar 11 2015 2:10 AM
Hi,
 
I am new to webapi.  I am using restsharp for calling api.
  
var client = _restSharp.CreateClient(ConfigurationManager.AppSettings["ApiURL"]);
var request = _restSharp.CreateRequest("Customer/GetCustomer", Method.POST);
request.RequestFormat = DataFormat.Json;
request.AddBody(Info);
var response = client.Execute(request);
string responseValue = response.Content;
 
This works fine for me. I want to pass one more parameter as object or as hashtable. How i do that.
 
Please do the needful ASAP. 

Answers (1)