compojure.api.common
extract-parameters
(extract-parameters c expect-body)
Extract parameters from head of the list. Parameters can be:
- a map (if followed by any form)
[{:a 1 :b 2} :body]
=>{:a 1 :b 2}
- list of keywords & values
[:a 1 :b 2 :body]
=>{:a 1 :b 2}
- else =>
{}
Returns a tuple with parameters and body without the parameters