Excellent now can you open an issue and provide add these examples in the ZnUrl class comment? Stef On Dec 13, 2011, at 2:23 PM, Sven Van Caekenberghe wrote:
I came across this:
a small Python library that makes parsing and manipulating URLs simple.
And this would be some equivalent manipulations using ZnUrl:
| url | url := 'http://www.google.com/?one=1&two=2' asZnUrl. url queryAt: 'three' put: '3'. url queryRemoveKey: 'one'. url
=>
http://www.google.com/?two=2&three=3
| url | url := 'http://www.google.com' asZnUrl. url addPathSegment: 'some encoding here'. url queryAt: 'and some encoding' put: 'here, too'. url
=>
http://www.google.com/some%20encoding%20here?and%20some%20encoding=here%2C%2...
So I guess our base Url object does not need an extra library to make manipulations easier.
Sven