Archives for December 2009

Woe is me, the WOA unmanifesto

This started as a comment on the blog post here, but it got too long.
I have two questions for Dion and a few comments. 1) Have you read (not just skimmed a few times) Roy’s dissertation on REST? 2) Have you written both a REST service and a REST client [...]

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.
Handling returned content
When you do make an http request with this library, the body of the response is wrapped inside an HttpContent object. So, when you [...]

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.
Retrieve some HTTP content from an URL

var client = new HttpClient();
var response = client.Get("http://example.org");

Post some content to an Url

var client = new HttpClient();
var content = HttpContent.Create("This is some string content");
var response = client.Post("http://example.com", [...]

Why the Microsoft.Http library is awesome.

In various forums I a finding myself raving about this new library.  I decided that I should write some blog posts on the subject for a few reasons.  1) to convince myself that there is actually some substance to my raving; 2) provide a place to point people to in order to substantiate my infatuation [...]