forest.route

Functions and macros to help building Compojure-like request handlers.

*app*

dynamic

FIXME: write docs

*request*

dynamic

FIXME: write docs

*response*

dynamic

FIXME: write docs

any

(any app uri handler)

Shorthand for requests that match any HTTP method.

ANY

macro

(ANY uri request-destructuring & content)

Generate a route that matches any method.

compile-route

macro

(compile-route method uri request-destructuring & content)

Compiles a route in the form (method path bindings & body) into a function. Used to create custom route macros.

defroutes

macro

(defroutes name & route-handlers)

Define a Foxx handler function from a sequence of routes. The name may optionally be followed by a doc-string and metadata map.

DELETE

macro

(DELETE uri request-destructuring & content)

Generate a DELETE route.

expand-handler

macro

(expand-handler uri-params request-destructuring & content)

Helper function for compile-route.

Wraps response body form inside several binding forms by utilizing with-uir-destructuring and with-request-destructuring

GET

macro

(GET uri request-destructuring & content)

Generate a GET route.

HEAD

macro

(HEAD uri request-destructuring & content)

Generate a HEAD route.

PATCH

macro

(PATCH uri request-destructuring & content)

Generate a PATCH route.

POST

macro

(POST uri request-destructuring & content)

Generate a POST route.

PUT

macro

(PUT uri request-destructuring & content)

Generate a PUT route.

routes

(routes & handlers)

Create a Foxx handler by combining several handlers into one.

routing

(routing app & handlers)

Apply a list of routes to a Foxx app.