Liking cljdoc? Tell your friends :D

ring.middleware.resource

Middleware for serving static resources.

Middleware for serving static resources.
raw docstring

resource-requestclj

(resource-request request root-path & [{:keys [loader]}])

If request matches a static resource, returns it in a response map. Otherwise returns nil.

If request matches a static resource, returns it in a response map.
Otherwise returns nil.
sourceraw docstring

wrap-resourceclj

(wrap-resource handler root-path & [{:keys [loader]}])

Middleware that first checks to see whether the request map matches a static resource. If it does, the resource is returned in a response map, otherwise the request map is passed onto the handler. The root-path argument will be added to the beginning of the resource path. If the optional :loader key is provided in the option map, the resource will be resolved by the given class loader instead of the context class loader.

Middleware that first checks to see whether the request map matches a static
resource. If it does, the resource is returned in a response map, otherwise
the request map is passed onto the handler. The root-path argument will be
added to the beginning of the resource path. If the optional :loader key is
provided in the option map, the resource will be resolved by the given class
loader instead of the context class loader.
sourceraw docstring

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

× close