Fork me on GitHub

I want to replace an rpc styled api with reitit. Currently all requests are made via POST and a query param e.g. localhost:3000/?action=foo . Can I set up my routes to cover each option of the action param in one specific route per action, so I'm able to define coercion parameters? Currently my setup doesn't match the route.

  ["?action=" {:parameters {:query {:id s/Int}}}
    ["foo" {:post {:parameters {:form {:x s/Int }}
                   :handler ::foo }]]]


The request has the path as query-string. So ist it possible to match on the query string?


i feel ?action is not part of the url per se.


try to move the config details to under "/"


I also have this solution, but its not possible to create schema definition, as a single function is handling all requests.