Friday, November 14, 2008

Essential HTTP Client Checklist and CFHTTP (Pt. 1)

Restful Web Services (Leonard Richardson and Sam Ruby, O'Rielly 2007)

I was reading "Restful Web Services" (Leonard Richardson and Sam Ruby, May 2007) and I came across a useful checklist of the 'must-have' and 'optional-extra' features of HTTP client software libraries, along with a comparison of HTTP client libraries for different platforms.

Out of curiosity I am going to measure ColdFusion 8's CFHTTP functionality against the check list to see how it fares, and then compare it to the Java libraries presented (because if CFHTTP fails to deliver your next step will no doubt be Java).

The following is their list of 'must-have' features, along with notes about the support within CFHTTP in ColdFusion 8.

  1. Support for HTTPS and SSL (Supported)

  2. Support for Methods GET HEAD PUT POST DELETE OPTIONS TRACE and optionally WebDAV extensions (like MOVE) ( Support exists for all HTTP spec methods but no extensions)

  3. Customisation of Entity Body of PUT and POST (Supported)

  4. Customisation of Request Headers (Supported)

  5. Access to the headers and the response code of the provided response(Supported)

  6. Support for HTTP Proxies (Supported - So long as you use basic proxy authentication- more later)

Here are the 'optional-extras':

  1. Automatic, Transparent HTTP Compression(Not Supported)

  2. Automatic, Transparent Response Caching (Using response headers) (Not Supported)

  3. Support for Basic, Digest and WSSE Authentication Basic is supported, but not Digest. WSSE is not supported, and NTLM authentication definitely is not either. This one bites!

  4. Support for Redirects (Supported - So long as you do not redirect more than 4 times in a valid use case.)

  5. Support for Client-side cookie management/acceptance (Despite superb Server-side Cookie capabilities, there is no client-side capabilities here)

In my experience, support for NTLM (or any) authentication should be in the must-have list (especially for corporate environments) but from the context of the author's pespective - RESTful Web Services - I thought the list was very good.

Note that CFHTTP has all the 'must have' features from this list, which is a surprising and pleasing result.

What about the other Java libraries? You'll need to wait for the next blog entry!

No comments:

Post a Comment