Skip to content

Instantly share code, notes, and snippets.

@dustingetz
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustingetz/c1c9e0121a342589de41 to your computer and use it in GitHub Desktop.
Save dustingetz/c1c9e0121a342589de41 to your computer and use it in GitHub Desktop.
streaker-service.routes> (-> (route "questions" '[:find ?e :where [?e :Question/text]] question/typeinfo)
                             (clojure.pprint/pprint))
["/questions"
 {:get
  [:questions
   #<routes$mk_coll_get$fn__25468 streaker_service.routes$mk_coll_get$fn__25468@29a0eb18>],
  :post
  [:questions/post
   #<routes$mk_coll_post$fn__25474 streaker_service.routes$mk_coll_post$fn__25474@751a8975>]}]
nil
streaker-service.routes> (clojure.pprint/pprint routes)
({:route-name :streaker-service.page/echo,
  :path-re #"/\Qecho\E",
  :method :any,
  :path "/echo",
  :path-parts ["echo"],
  :path-params [],
  :interceptors
  [{:name :streaker-service.page/echo,
    :enter
    #<interceptor$before$fn__10535 io.pedestal.interceptor$before$fn__10535@4c889f3a>,
    :leave nil,
    :error nil}]}
 {:route-name :streaker-service.routes/api-get,
  :path-re #"/\Qapi\E",
  :method :get,
  :path "/api",
  :path-parts ["api"],
  :path-params [],
  :interceptors
  [{:name :io.pedestal.http.body-params/body-params,
    :enter
    #<interceptor$on_request$fn__10577 io.pedestal.interceptor$on_request$fn__10577@3e2b4831>,
    :leave nil,
    :error nil}
   {:name :streaker-service.pedestal-util/auto-content-type,
    :enter nil,
    :leave
    #<interceptor$after$fn__10551 io.pedestal.interceptor$after$fn__10551@23845ac>,
    :error nil}
   {:name :streaker-service.pedestal-util/combine-body-params,
    :enter
    #<interceptor$on_request$fn__10577 io.pedestal.interceptor$on_request$fn__10577@487444d3>,
    :leave nil,
    :error nil}
   {:name :streaker-service.routes/api-get,
    :enter
    #<interceptor$before$fn__10535 io.pedestal.interceptor$before$fn__10535@13c5fc5c>,
    :leave nil,
    :error nil}]}
 {:route-name :questions/post,
  :path-re #"/\Qapi\E/\Qquestions\E",
  :method :post,
  :path "/api/questions",
  :path-parts ["api" "questions"],
  :path-params [],
  :interceptors
  [{:name :io.pedestal.http.body-params/body-params,
    :enter
    #<interceptor$on_request$fn__10577 io.pedestal.interceptor$on_request$fn__10577@3e2b4831>,
    :leave nil,
    :error nil}
   {:name :streaker-service.pedestal-util/auto-content-type,
    :enter nil,
    :leave
    #<interceptor$after$fn__10551 io.pedestal.interceptor$after$fn__10551@23845ac>,
    :error nil}
   {:name :streaker-service.pedestal-util/combine-body-params,
    :enter
    #<interceptor$on_request$fn__10577 io.pedestal.interceptor$on_request$fn__10577@487444d3>,
    :leave nil,
    :error nil}
   nil]}
 {:route-name :questions,
  :path-re #"/\Qapi\E/\Qquestions\E",
  :method :get,
  :path "/api/questions",
  :path-parts ["api" "questions"],
  :path-params [],
  :interceptors
  [{:name :io.pedestal.http.body-params/body-params,
    :enter
    #<interceptor$on_request$fn__10577 io.pedestal.interceptor$on_request$fn__10577@3e2b4831>,
    :leave nil,
    :error nil}
   {:name :streaker-service.pedestal-util/auto-content-type,
    :enter nil,
    :leave
    #<interceptor$after$fn__10551 io.pedestal.interceptor$after$fn__10551@23845ac>,
    :error nil}
   {:name :streaker-service.pedestal-util/combine-body-params,
    :enter
    #<interceptor$on_request$fn__10577 io.pedestal.interceptor$on_request$fn__10577@487444d3>,
    :leave nil,
    :error nil}
   nil]}
 {:route-name :streaker-service.routes/friends-post,
  :path-re #"/\Qapi\E/\Qfriends\E",
  :method :post,
  :path "/api/friends",
  :path-parts ["api" "friends"],
  :path-params [],
  :interceptors
  [{:name :io.pedestal.http.body-params/body-params,
    :enter
    #<interceptor$on_request$fn__10577 io.pedestal.interceptor$on_request$fn__10577@3e2b4831>,
    :leave nil,
    :error nil}
   {:name :streaker-service.pedestal-util/auto-content-type,
    :enter nil,
    :leave
    #<interceptor$after$fn__10551 io.pedestal.interceptor$after$fn__10551@23845ac>,
    :error nil}
   {:name :streaker-service.pedestal-util/combine-body-params,
    :enter
    #<interceptor$on_request$fn__10577 io.pedestal.interceptor$on_request$fn__10577@487444d3>,
    :leave nil,
    :error nil}
   {:name :streaker-service.routes/friends-post,
    :enter
    #<interceptor$before$fn__10535 io.pedestal.interceptor$before$fn__10535@19f49d1d>,
    :leave nil,
    :error nil}]}
 {:route-name :streaker-service.routes/friends-get,
  :path-re #"/\Qapi\E/\Qfriends\E",
  :method :get,
  :path "/api/friends",
  :path-parts ["api" "friends"],
  :path-params [],
  :interceptors
  [{:name :io.pedestal.http.body-params/body-params,
    :enter
    #<interceptor$on_request$fn__10577 io.pedestal.interceptor$on_request$fn__10577@3e2b4831>,
    :leave nil,
    :error nil}
   {:name :streaker-service.pedestal-util/auto-content-type,
    :enter nil,
    :leave
    #<interceptor$after$fn__10551 io.pedestal.interceptor$after$fn__10551@23845ac>,
    :error nil}
   {:name :streaker-service.pedestal-util/combine-body-params,
    :enter
    #<interceptor$on_request$fn__10577 io.pedestal.interceptor$on_request$fn__10577@487444d3>,
    :leave nil,
    :error nil}
   {:name :streaker-service.routes/friends-get,
    :enter
    #<interceptor$before$fn__10535 io.pedestal.interceptor$before$fn__10535@35ea6112>,
    :leave nil,
    :error nil}]}
 {:route-name :streaker-service.routes/friend-item-get,
  :path-re #"/\Qapi\E/\Qfriends\E/([^/]+)",
  :method :get,
  :path-constraints {:id "([^/]+)"},
  :path "/api/friends/:id",
  :path-parts ["api" "friends" :id],
  :path-params [:id],
  :interceptors
  [{:name :io.pedestal.http.body-params/body-params,
    :enter
    #<interceptor$on_request$fn__10577 io.pedestal.interceptor$on_request$fn__10577@3e2b4831>,
    :leave nil,
    :error nil}
   {:name :streaker-service.pedestal-util/auto-content-type,
    :enter nil,
    :leave
    #<interceptor$after$fn__10551 io.pedestal.interceptor$after$fn__10551@23845ac>,
    :error nil}
   {:name :streaker-service.pedestal-util/combine-body-params,
    :enter
    #<interceptor$on_request$fn__10577 io.pedestal.interceptor$on_request$fn__10577@487444d3>,
    :leave nil,
    :error nil}
   {:name :streaker-service.routes/friend-item-get,
    :enter
    #<interceptor$before$fn__10535 io.pedestal.interceptor$before$fn__10535@4ba0f2b0>,
    :leave nil,
    :error nil}]})
nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment