Web API , Can we consume a web Api from C# ???
Can someone let me know the correct answer for this question asked in an interview.
Look into the HttpClient class.
Hi sonia22,
Welcome to ASP.NET Forum .
As @BrockAllen said , you could use HttpClient to consume web api . Please refer to below articles for details and demo :
http://www.codeproject.com/Articles/611176/Calling-ASP-NET-WebAPI-using-HttpClient
http://www.asp.net/web-api/overview/advanced/calling-a-web-api-from-a-net-client .
Best Regards,
Nan Yu