New to HTTPBuilder? See the Overview page.

News

You can also follow project updates on Twitter

16 Oct 2009 - Added Ohloh Stats

In case you haven't realized, I added this project to Ohloh, which found HTTPBuilder to be "Extremely well commented," :) but also a "small development team." :( The stats are a little off too, since it has included the HTML and XHTML DTDs which are in source control, but I obviously did not write them...

On a related note, if the Ohloh animated GIF on the sidebar particularly annoys anyone, just complain and I can remove it. Although I do like how it brags about the project :)

06 Oct 2009 - More Snapshots & important changes...

So no matter how hard I try, I can't seem to release 0.5.0. More accurately, a few important issues came up that I didn't want to fix in a 0.6 branch immediately after a 0.5.0 release. So my solution instead is to introduce some late changes...

Probably the most important change is URIBuilder's handling of query parameters. Previously, URIBuilder only allowed a single value per-parameter. That is, it was impossible to do ?one=1&two=2&one=3 because the Map literal does not allow duplicate keys. Well, now you can pass a list of values like so: uri.query = [ one: ['1','3'] , two: 2 ] which will add two values for one. Of course, this behavior merits a change to the addQueryParam method as well. As a result, URIBuilder.addQueryParam> and addQueryParams will not replace any existing parameters with the same name; instead it will add to a multi-valued list for the given parameter. Parameters with single values will remain as strings, not lists.

16 June 2009 - 0.5.0 RC1!

RC1 is released! Go download it!

Keep in mind there are a few breaking changes from 0.4.1. See the JIRA report for a full list of changes. Some breaking changes include:

  1. New Maven group - org.codehaus.groovy.modules.http-builder
  2. HTTPBuilder.(get|post) named arguments - params is now query
  3. The HTTPBuilder class' URL property has been renamed to uri

Of course the 0.5.0 release has a ton of more interesting changes; read below for most of them...

13 June 2009 - Release Candidate (almost...)

I was just about to release version 0.5.0-RC1 and announce it on the mailing list, when suddenly my unit tests started failing! HTTP response code: 503 - http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ... What? Turns out, I got bit by the W3C trying frantically to conserve their bandwidth.

So realizing this is something that should really be built in, I added the capability via Apache's XML Resolver. All HTML4 and XHTML DTDs are now cached in a default catalog, so parsing any sites that reference those DTDs should see a significant performance improvement now.

29 May 2009

The 0.5.0 release is almost feature complete; see JIRA for a list of issues that have been gone into this version. One of the major changes in today's snaphot release is deprecation of the 'params' named parameter.

For HTTPBuilder operations that take name parameters, params has been replaced by query to set URL query parameters. This is to more clearly differentiate between URL and form POST parameters, and to avoid possible collision with future convenience methods for Apache HttpClient 'params' configuration.

Please test out the latest snapshot; if I don't hear any bug reports in a week or two, I'll release v0.5.0.

27 Apr 2009

Note to Maven users: The project's group ID has changed to conform with the standard for Groovy projects hosted on Codehaus. The new group ID is org.codehaus.groovy.modules.http-builder.

The 0.5 release is still pending, but I have an exciting new feature - HttpURLClient. This may seem redundant, since its features are almost identical to HTTPBuilder and RESTClient. The kicker though is that this class works with Google App Engine!

GAE's Java sandbox doesn't allow socket usage, which totally kills Apache HttpClient (and hence, HB). This class uses HttpURLConnection for all I/O, enabling most of the conveniences of HTTPBuilder within GAE. Try it out in the latest HTTPBuilder snapshot.

30 Mar 2009

Documentation is in the process of being overhauled to provide more comprehensive API examples. I've published a version that is still in progress, but certainly better than the single document that I had previously.

11 Mar 2009

The latest 0.5 version now includes a new RESTClient class for even easier REST-style operations without a user-defined closure! See the Twitter example, and the updated JavaDoc.

04 Mar 2009

Now you can follow us on Twitter! HTTPBuilder now 'tweets' its releases as an automated part of the build process. This is a neat proof-of-concept that could easily be added to any Maven build thanks to GMaven. See the POM and tweet script for details.