HttpClient as already suggested but, the framework does suffer from a myriad
of choices (mostly due to historical choices). HttpWebRequest can do it too,
any number of proxies as well. Or you can go lower level but I would suggest
getting familiar with HttpClient. That way of working is the way things will
get done in the future (imho).

 

-          Glav

 

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
On Behalf Of Heinrich Breedt
Sent: Friday, 1 February 2013 8:08 PM
To: ozDotNet
Subject: SPAM-LOW Re: Web api

 

.net client: httpclient
Webpage: ajax get/post 

On 1 Feb 2013 18:16, "Stephen Price" <step...@perthprojects.com
<mailto:step...@perthprojects.com> > 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 <matho...@internode.on.net
<mailto:matho...@internode.on.net> > 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: ozdotnet-boun...@ozdotnet.com <mailto:ozdotnet-boun...@ozdotnet.com>
[mailto:ozdotnet-boun...@ozdotnet.com <mailto:ozdotnet-boun...@ozdotnet.com>
] 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