glimpse.middleware

Functions to interop with Ring and Compojure.

create-body

(create-body request response)
Creates an HTML string given the request and using the response value to bind
to the view.

lookup-path

(lookup-path request)
Creates a path to use for searching for views.

Substitutes values of wildcards for nothing in the request URI (e.g., if the
URI is `/post/1234/comments`, and the route-params are {:id 1234}, then the
resulting lookup path will be `/post/comments`.

wrap-glimpse

(wrap-glimpse handler)
Provides a Glimpse wrapper for Ring.  Must be used *after* route-params are
populated in the request.

Looks up the view based on the request URI.  Takes a map of data from the
route implementation and binds it to the view, using the top-level keys as
scope names.  Renders the view and returns the resulting HTML.