http (Page 6)

But can you test it?

Testing code that uses HttpWebRequest directly, is a real pain.  Usually what I have seen people do is create a service interface that hides the real http client behind the interface and then create fake service implementations to actually run their tests against.  The annoying part about that solution is that Http client interfaces tend to be relatively large to fake when you consider all the properties and methods of the Http request objects and http response objects.  It is not inconceivable that the interface ends up exposing 90% of the functionality of the http client objects.

Read more...

HttpContent instead of streams

I think the HttpContent class is my favourite part of this library.  This class acts as a container for the content that you received or are about to send.

Read more...

HttpClient – The basics

Before I go into any details I thought it would be valuable to give some basic examples of how to use the HTTPClient.

Read more...

Oh Data

Since the recent PDC09 I have been obsessing over OData and I need to write this post just to get it out of my head.  Microsoft has made it obvious that they are taking this protocol very seriously by integrating it into Sharepoint, Visual Studio, RIA Services, PowerPivot, and I expect to see it in the next version of Office and in the Dynamics products.  I think it is a great direction to be headed but I also have concerns.

Read more...

How to write a document describing a REST Api

Roy Fielding wrote this post recently on the proliferation of APIs that claim to be REST but are breaking some of the fundamental constraints of a REST style architecture.

Read more...