API Evolution (Page 39)

Writings about API Design, OpenAPI, HTTP and related topics.

Using the HttpClient and the OData service to download Mix videos

Here is some code I wrote to give me some experience playing with an OData service, learning more Linq, using my favourite HTTP client library and getting to download mix videos. 

Read more...

Convert XML to JSON using XSLT

How about that for acronym soup?  In the spirit of doing smaller posts but more often, here is a handy little XSLT. 

Read more...

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...