jgritman/httpbuilder — pull request #9 by mbabineau (2013-03-04 20:50:06+00:00)
Title: Fix URIBuilder groovy example

The .with closure returns the last result, not the object.

Old example:

groovy> import groovyx.net.http.URIBuilder
groovy> new URIBuilder('http://www.google.com/').with {
groovy> scheme = 'https'
groovy> port = 443
groovy> path = 'some/path'
groovy> query = [p1:1, p2:'two']
groovy> }

["p1":1, "p2":"two"]

New example:

groovy> new URIBuilder('http://www.google.com/').with {
groovy> scheme = 'https'
groovy> port = 443
groovy> path = 'some/path'
groovy> query = [p1:1, p2:'two']
groovy> return it
groovy> }

https://www.google.com:443/some/path?p1=1&p2=two