Without having tested it: I think you're "curl -d" format is wrong. It's not semicolon separated: http://superuser.com/questions/149329/what-is-the-curl-command-line-syntax-to-do-a-post-request
HTH On Wednesday, February 18, 2015 at 7:09:19 AM UTC-5, g vim wrote: > > I have a Liberator app which works with this: > > (defresource user [day month year hour min region location] > :available-media-types ["application/json"] > :handle-ok (generate-string (clc/calc day month year hour min 0 (str > region "/" location)))) > > (defroutes app-routes > (GET "/user/:day/:month/:year/:hour/:min/:region/:location" [day > month year hour min region location] > (user (Integer/parseInt day) (Integer/parseInt month) > (Integer/parseInt year) (Integer/parseInt hour) (Integer/parseInt min) > region location)) > > .... but doesn't work with POST: > > (defroutes app-routes > (POST "/user" [day month year hour min region location] > (user (Integer/parseInt day) (Integer/parseInt month) > (Integer/parseInt year) (Integer/parseInt hour) (Integer/parseInt min) > region location)) > > > Testing with with: > > curl -d > "day=10;month=8;year=1970;hour=13;minute=45;region=Europe;location=London" > http://localhost:3000/user > > .... returns an error with the first parameter truncated: > > java.lang.NumberFormatException For input string: > "14;month=10;year=1960;hour=13;minute=44;region=Europe;location=London" > > What am I doing wrong and why is the POST data truncated in the error > message? > > gvim > > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] 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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
