Liking cljdoc? Tell your friends :D

calfpath.core

Routing macros in Calfpath.

Routing macros in Calfpath.
raw docstring

->deleteclj/smacro

(->delete request expr)
(->delete request expr default-expr)
source

->getclj/smacro

(->get request expr)
(->get request expr default-expr)
source

->headclj/smacro

(->head request expr)
(->head request expr default-expr)
source

->methodclj/smacro

(->method request & clauses)

Like clojure.core/case except that the first argument must be a request map. Odd numbered clauses imply the last argument is the default expression invoked on no-match. Even numbered clauses return HTTP 405 (method not supported) by default on no-match. The dispatch happens in constant time.

Like clojure.core/case except that the first argument must be a request map. Odd numbered clauses imply the last
argument is the default expression invoked on no-match. Even numbered clauses return HTTP 405 (method not supported)
by default on no-match. The dispatch happens in constant time.
sourceraw docstring

->optionsclj/smacro

(->options request expr)
(->options request expr default-expr)
source

->patchclj/smacro

(->patch request expr)
(->patch request expr default-expr)
source

->postclj/smacro

(->post request expr)
(->post request expr default-expr)
source

->putclj/smacro

(->put request expr)
(->put request expr default-expr)
source

->uriclj/smacro

(->uri request & clauses)

Given a ring request map and pairs of URI-templates (e.g. '/user/:id/profile/:type/') and expression clauses, evaluate matching expression after adding URI params as a map to the :params key in the request map. Odd numbered clauses imply the last argument is the default expression invoked on no-match. Even numbered clauses return HTTP 400 by default on no-match. The dispatch happens in linear time based on URI length and number of clauses.

Given a ring request map and pairs of URI-templates (e.g. '/user/:id/profile/:type/') and expression clauses,
evaluate matching expression after adding URI params as a map to the :params key in the request map. Odd numbered
clauses imply the last argument is the default expression invoked on no-match. Even numbered clauses return HTTP 400
by default on no-match. The dispatch happens in linear time based on URI length and number of clauses.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close