Re: Problems with URL params and http-agent

2010-06-19 Thread Michael Wood
On 18 June 2010 23:54, Timothy Washington wrote: > That works, thanks. It's a bit weird because I did try just http encoding > the parameters before. But I obviously encoded the wrong characters, or > maybe used the wrong character encoding. Hmmm. > > Thanks :) No problem :) -- Michael Wood -

Re: Problems with URL params and http-agent

2010-06-18 Thread Timothy Washington
That works, thanks. It's a bit weird because I did try just http encoding the parameters before. But I obviously encoded the wrong characters, or maybe used the wrong character encoding. Hmmm. Thanks :) On Fri, Jun 18, 2010 at 11:24 AM, Michael Wood wrote: > On 18 June 2010 14:53, Timothy Wash

Re: Problems with URL params and http-agent

2010-06-18 Thread Michael Wood
On 18 June 2010 14:53, Timothy Washington wrote: > Hmm, this is a good idea and I got the GET request string as... > /exist/rest/rootDir/system.main.system/aauthentication.main.authentication/users.aauth.users/user.one/user.one?_wrap=no&_query=declare > default element namespace 'com/interrupt/boo

Re: Problems with URL params and http-agent

2010-06-18 Thread Timothy Washington
That's a good idea which I tried. But no dice. I have a feeling I'm not handling the response properly in Clojure. See my other posts here. Tim On Thu, Jun 17, 2010 at 3:57 PM, RandyHudson wrote: > You don't want to encode the whole URL, just the keys and values in > the query string. Somethin

Re: Problems with URL params and http-agent

2010-06-18 Thread Timothy Washington
Oh... and the /tmp/out file is empty. Tim On Fri, Jun 18, 2010 at 8:53 AM, Timothy Washington wrote: > Hmm, this is a good idea and I got the GET request string as... > */exist/rest/rootDir/system.main.system/aauthentication.main.authentication/users.aauth.users/user.one/user.one?_wrap=no&_quer

Re: Problems with URL params and http-agent

2010-06-18 Thread Timothy Washington
Hmm, this is a good idea and I got the GET request string as... */exist/rest/rootDir/system.main.system/aauthentication.main.authentication/users.aauth.users/user.one/user.one?_wrap=no&_query=declare default element namespace 'com/interrupt/bookkeeping/users';//user[ @id='one']* This exact URI (be

Re: Problems with URL params and http-agent

2010-06-17 Thread RandyHudson
You don't want to encode the whole URL, just the keys and values in the query string. Something like this: (defn encode-params [request-params] (let [encode #(URLEncoder/encode (str %) "UTF-8") coded (for [[n v] request-params] (str (encode n) "=" (encode v)))] (apply str (interpose

Re: Problems with URL params and http-agent

2010-06-17 Thread Jim Blomo
On Wed, Jun 16, 2010 at 6:21 PM, Timothy Washington wrote: > Hey all, something very weird happens when trying to use the http-agent. If > I execute a) or b) in a browser, I get the desired result XML. > a) http://RESTful/path/to/xml > b) http://RESTful/path/to/xml?_wrap=no&_query=declare default

Problems with URL params and http-agent

2010-06-16 Thread Timothy Washington
Hey all, something very weird happens when trying to use the http-agent. If I execute a) or b) in a browser, I get the desired result XML. a) http://RESTful/path/to/xml b) http://RESTful/path/to/xml?_wrap=no&_query=declare default element namespace 'com/interrupt/bookkeeping/users';//user[ @id='one