clojure - Posting to a compojure URL programmatically -


What is a way to access routes through a program (without calling via http)

For example: (Main routes (post / "query" "OK ... ..."))

Can I use a "query" function which is generating metro is?

defroutes creates a ring handler with the same name that you have it did . So basically you have a ring handler, which is a simple task that takes a request map and gives a feedback map.

In your case, you have the function main-routes the appropriate ring request map object which has the uri key, which it will send to the "/ query" handler function being given.

Comments

Popular posts from this blog

python - Assemble mpeg file unable to play in mediaplayer -

c# - crystal report failed -

mongodb - CakePHP paginator ignoring order, but only for certain values -