Developers: New HTTP Client, Web API and More


Thursday, October 16, 2008  

With the previous release, several enhancements were made to EditMe's development platform. Namely, a new HTTP client was added to the JavaScript API that allows for much more flexiblity in consumption of web-based and REST-ful APIs, EditMe's own REST-ful API was created, and the include tag has been put on steroids with support for scripted pages and arguments.

New HTTP Client

The new HTTP client class replaces the httpGet and httpPost methods on the Util class. Those will remain for backward compatibility, but new code should be written to use the new HttpClient class. Benefits to the new class include:

  • Reuse of the client for multiple requests, using less overhead and providing better performance for multiple requests.
  • Support for session persistence across multiple requests.
  • Support for HTTP Basic Authentication, required by many REST APIs.
  • Support for HTTP headers, both to send and to use returned response headers.
  • Support for non-standard ports (other than 80 and 443).

See the full documentation for additional details.

EditMe Web API

EditMe's AJAX functionality used by the new editing interface uses a REST-like web API that returns XML responses to various queries. While the API was created to do what we needed it to do, it's available to developers to use in any way they like. As time goes on, the Web API will be enhanced to support a more complete set of read/write capabilities.

See the full documentation for additional details.

Scripted Page Includes

The [[include:...]] tag now supports scripted pages. This means developers can create scripted pages that can be easily dropped into normal EditMe pages by non-technical users. This feature will see heavy use in the next release, but it's there now for your enjoyment. What makes this feature really powerful is the ability to include arguments. For example: [[include:MyScript any text can go here...]]. This will invoke the MyScript page and provide an implicit object named "include_args" that is set to "any text can go here...". The Using Includes page has been updated to reflect this feature.

 

Stay Connected with EditMe

Subscribe via Email

Your Email:

Delivered by FeedBurner