Saturday, October 5, 2013

How to call API URL in asp.net c#

string url = "{url}"
string param = "name value pair data";
System.Net.WebClient webClient = new System.Net.WebClient();
string encoding = "application/x-www-form-urlencoded";
webClient.Headers[System.Net.HttpRequestHeader.ContentType] = encoding;
string res = webClient.UploadString(url, param);

No comments:

Post a Comment