Thanks to visit codestin.com
Credit goes to github.com

Skip to content
aliostad edited this page Jul 15, 2012 · 8 revisions

PocoHttp

PocoHttp (where POCO stands for Plain-Old-CSharp-Object) is a non-opinionated .NET Client Library for accessing HTTP data services using a familiar IQueryable interface, similar to ORMs such as Entity Framework. This allows the client to work with the IQueryable interface similar to other data source and being abstracted from HTTP calls.

PocoHttp support different querying Grammars but by default uses an implementation of OData querying Grammar specified by OData spec. Not all OData querying features are suported. The intention is not to replicate the OData client features already available but to expose those features that are supported by ASP.NET Web API.

PocoHttp is dependent on System.Net.Http available as NuGet packages (currently Microsoft.AspNet.WebApi.Client).

A minimal example

var pocoClient = new PocoClient()
                 	{
                 		BaseAddress = new Uri("http://localhost:12889/api/")
                 	};
var list = pocoClient.Context<Car>()
	.Take(1).ToList();
Console.WriteLine(list[0]);

Blog posts

Introducing PocoHttp: Consuming HTTP data services

Using PocoHttp to consume Classic OData services

Clone this wiki locally