Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

How do you access restful services using C#?

$
0
0

Hi;

I have a restful client that I created in C# using web api 2. I am trying to write a client in C# that I can access that restful service. I am using .net 4.5.1 and every example I have seen uses HttpContent::ReadAsync which no longer seems to be a method in HttpContent. I do see Readasync for String, byte and stream. I have been looking for example code for how to uses these methods but can't find anything. The Get methods I will be accessing are passing back an object or list of objects and I'm not sure how to deserialize from the httpcontent. Can anyone point me to an example? 

I have seen this article "http://www.asp.net/web-api/overview/advanced/calling-a-web-api-from-a-net-client". The problem is it uses the method ReadAsync which is no longer a member of HttpContent.


Viewing all articles
Browse latest Browse all 4850

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>