Absolutely, there's nothing locking you into using a third-party tool to
access a REST endpoint. For me RestSharp had too many nice features in it
that made it an easy decision for me to justify using, but YMMV.

 

NuGet also makes it nice and easy to add this stuff to your projects, but
it's also easy to go overboard sometimes and bloat an otherwise simple
solution with a dozen different frameworks.

 

From: [email protected] [mailto:[email protected]]
On Behalf Of Craig van Nieuwkerk
Sent: Friday, 1 February 2013 7:10 PM
To: ozDotNet
Subject: Re: Web api

 

WebAPI are just normal urls like web pages. You can call using HttpClient

 

http://msdn.microsoft.com/en-us/library/system.net.http.httpclient.aspx

 

On Fri, Feb 1, 2013 at 7:15 PM, Stephen Price <[email protected]>
wrote:

Really? the only way to call Rest API's is with a third party add on?

 

I was kind of looking for the out of the box way. But will have a look at
RestSharp, always handy to know whats out there. They invent this stuff
faster than anyone can learn it all. :)

 

On Fri, Feb 1, 2013 at 2:53 PM, Mark Thompson <[email protected]>
wrote:

You might like to try something like RestSharp ( http://restsharp.org/ ) -
it has some very nice helpers for adding request parameters and additional
headers. I haven't used it extensively, but for the times I have used it, it
made the whole process pretty painless.

 

Regards,

Mark.

 

From: [email protected] [mailto:[email protected]]
On Behalf Of Stephen Price
Sent: Friday, 1 February 2013 4:38 PM
To: ozDotNet
Subject: Web api

 

Hey all,

 

While we are on the subject of MVC, I was looking about for an example or
walkthrough of how you might call a Rest Web API from an MVC app. 

 

Not found much so far. I found a console C# app that uses the Asp.Net Web
API Client libraries to call one. I've also found some examples of how to
write the Web API's using MVC. 

 

So am scratching my head.. what httpX namespace is the right one to use?
HttpClient? something else? 

 

cheers,

Stephen

 

 

Reply via email to