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 SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

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