What's the content-type of the POST? If it's "application/x-www-form-urlencoded", then the body stream will be automatically parsed into a map of parameters, thus consuming the stream.
- James On 19 December 2010 02:30, Miki <miki.teb...@gmail.com> wrote: > Greetings, > > I'm trying to get the body of HTTP POST in Compojure (0.5.3). > > I have the following code: > (defn handle-post [body] > (log/info (.read body)) > "OK") > > (defroutes tropo-routes > (GET "/" [] (welcome-page)) > (POST "/post" {body :body} (handle-post body)) > (route/not-found "Sorry, can't find it.")) > > When I send the server a POST request, -1 is logged (which means not input > available). > > Any ideas how to do it right? > > Thanks, > -- > Miki > > -- > 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 -- 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