Distributed Web API discovery
The site apisjson.org defines a specification for creating a document that declares the existence of an API on the web. This document provides some identification information about the API and links to documentation and to the actual API root URL. It also supports pointing to other resources like API design metadata documents and contact information for maintainers of the API.
A Tekpub API
Rob Conery asked for some feedback on an API he has been building for Tekpub. I know that Rob asked for URLs, and URLs he shall get, but I like to get a better understanding of the relationships between my resources before I start minting URLs for my service.
How to GET aHEAD with MessageHandlers!
It appears I need to go on vacation more often. I seem to get more chance to experiment. One of my first discussions about RACK was with Mike Kelly where he suggested a simple solution to implementing HEAD across an API. Simply use a RACK application to convert a HEAD request to a GET and then when the response comes back, drop the body. Seeing as I am on a roll implementing obscure HTTP methods using HttpMessageHandler I decided to give it a try.
HTTP Trace was never so easy
So there I was, sitting at my PC hunting some bugs when up pops John Sheehan on IM and starts asking me questions about OPTIONS and TRACE http methods. I pretty much always have the HTTP spec close at hand so I think I was able to at least fake some prior knowledge in attempting to answer his questions. As the discussion continued it started to pique my interest in TRACE. I have been meaning to look into this this obscure HTTP method for some time but have just never got around to it.
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.
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.