WorknHardr
asked on
ASP.NET REST Servics Calls
I found a nice article here. The problem is no explanation for 'Calling' the service from a client.
http://www.codeproject.com/Articles/426769/Creating-a-REST-service-using-ASP-NET-Web-API?msg=4323046#xx4323046xx
http://www.codeproject.com/Articles/426769/Creating-a-REST-service-using-ASP-NET-Web-API?msg=4323046#xx4323046xx
ASKER
I suppose using WebClient or HttpWebResponse like the following code snippet would be the correct consuming methodology?
using System.Net;
string url = String.Format("http://localhost/task);
WebClient serviceRequest = new WebClient();
string response = serviceRequest.DownloadStr ing(new Uri(url));
using System.Net;
string url = String.Format("http://localhost/task);
WebClient serviceRequest = new WebClient();
string response = serviceRequest.DownloadStr
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you
...since a browser will send a GET by default. You could also use Fiddler to get a bit fancier with POSTs and PUTs, if the tutorial demonstrates those (I haven't checked).