Skip to content

About

Declare routes for ring/compojure independent of handlers

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

Repository files navigation

# clout-link

Specify ring/clout routes separately from their handlers.
Generate uris and requests based on routes and arguments

## Usage

  (use 'clout-link.defroute)

  (defroute my-route :get "/foo/:bar/:bla")


  (use 'clout-link.route)

  (url-for my-route bar-arg bla-arg)
  => "/foo/bar-arg/bla-arg"

  (def my-handler 
       (handle my-route
                (fn [req] 
                   (do-something-with req))))

  (use 'clout-link.mock)

  (my-handler (request my-route bar-arg bla-arg))

## License

Copyright (C) 2011-2012 Joost Diepenmaat, joost@zeekat.nl

Distributed under the Eclipse Public License, the same as Clojure.

About

Declare routes for ring/compojure independent of handlers

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages