How to consume ASP.NET Web API RC with HttpClient?

In previous post I discussed How to consume ASP.NET Web API RC with RestSharp?. RestSharp seems to be a good candidate for working with REST service but during development I found out a problem that RestSharp doesn’t handle enum type very well and I got always null object by posting object to web service. The reason is because ASP.NET Web API serializes enumerated type to integer and RestSharp can only deserialize enumerated type under string format. As consequence you could notice in previous post, the Category property of Product is a kind of enumerate ProductCategories but I have to define it as int so that the serialization works.

Continue reading How to consume ASP.NET Web API RC with HttpClient?