Yes, that was it. Thanks
On Sun, May 2, 2010 at 10:04 PM, Antony Blakey <antony.bla...@gmail.com>wrote: > > On 03/05/2010, at 10:47 AM, Timothy Washington wrote: > > > Hey, ok so a noobie question here. I'm trying to use the 'http-agent' > function to make HTTP calls. I can do so easily as in fig. 1. But when I try > to make a PUT call as in fig. 2, I get a pretty ugly stacktrace, the bottom > one having the error "Caused by: java.lang.IllegalArgumentException: No > method in multimethod 'send-request-entity' for dispatch value: class > clojure.lang.PersistentStructMap" (fig. 3). > > > > I figure I'm doing something dumb here but can't figure out what... > > 1) I've tried adding a no-op handler function (fn [agnt] ) to see if the > error goes away - nope. > > 2) I tried adding the example handler function that writes the response > directly to dis - no dice > > :handler (fn [agnt] (with-open [w > > (clojure.contrib.io/writer"/tmp/out")] ( > clojure.contrib.io/copy (clojure.contrib.http.agent/stream agnt) w))) > > > > Is there anything obvious I'm missing here? > > The error is that it can't send your XML as the body. Convert the XML to a > string and send that. > > Antony Blakey > ------------- > CTO, Linkuistics Pty Ltd > Ph: 0438 840 787 > > Every task involves constraint, > Solve the thing without complaint; > There are magic links and chains > Forged to loose our rigid brains. > Structures, structures, though they bind, > Strangely liberate the mind. > -- James Fallen > > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com<clojure%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en