Fork me on GitHub
#yada
<
2016-07-22
>
imre14:07:01

does anyone know off the top of their heads how one can use query params in yada?

imre14:07:17

as I how do I make my resources aware of them

malcolmsparks14:07:04

clojure
(defn hello-parameter []
  ["/hello-parameter"
   (yada/resource
    {:methods
     {:get
      {:parameters {:query {:p String}}
       :produces "text/plain"
       :response (fn [ctx] (format "Hello %s!\n" (-> ctx :parameters :query :p)))
       }}})])

imre15:07:03

thanks a million, Malcolm!