A Clojure web applications library.
Released under the MIT License license
To install, add the following dependency to your project or build file:
[ring "1.8.1"]
ring {:mvn/version "1.8.1"}
A Ring adapter that uses the Jetty 9 embedded web server.
Adapters are used to convert Ring handlers into running web servers.
Public variables and functions: run-jetty
Protocols necessary for Ring.
Public variables and functions: StreamableResponseBody
A handler that displays the received request map.
This is useful for debugging new adapters.
Public variables and functions: handle-dump
Middleware for automatically adding a content type to response maps.
Public variables and functions: content-type-response wrap-content-type
Middleware for parsing and generating cookies.
Public variables and functions: CookieDateTime CookieInterval cookies-request cookies-response wrap-cookies
Middleware to serve files from a directory.
Most of the time you should prefer ring.middleware.resource instead, as this middleware will not work with files in jar or war files.
Public variables and functions: file-request wrap-file
Middleware to add Last-Modified and Content-Type headers to file responses.
This middleware is deprecated. Prefer the ring.middleware.content-type and ring.middleware.not-modified middleware instead.
Public variables and functions: file-info-response wrap-file-info
Middleware that adds session-based flash store that persists only to the next request in the same session.
Public variables and functions: flash-request flash-response wrap-flash
Middleware to simplify replying to HEAD requests.
A response to a HEAD request should be identical to a GET request, with the exception that a response to a HEAD request should have an empty body.
Public variables and functions: head-request head-response wrap-head
Middleware that converts parameter keys in the request to keywords.
Public variables and functions: keyword-params-request wrap-keyword-params
Middleware that checks Ring requests and responses for correctness.
Public variables and functions: wrap-lint
Middleware that parses multipart request bodies into parameters.
This middleware is necessary to handle file uploads from web browsers.
Ring comes with two different multipart storage engines included:
ring.middleware.multipart-params.byte-array/byte-array-store ring.middleware.multipart-params.temp-file/temp-file-store
Public variables and functions: multipart-params-request wrap-multipart-params
A multipart storage engine for storing uploads as in-memory byte arrays.
Public variables and functions: byte-array-store
A multipart storage engine for storing uploads in temporary files.
Public variables and functions: temp-file-store
Middleware to convert a single-depth map of parameters to a nested map.
Public variables and functions: nested-params-request parse-nested-keys wrap-nested-params
Middleware that returns a 304 Not Modified response for responses with Last-Modified headers.
Public variables and functions: not-modified-response wrap-not-modified
Middleware to parse url-encoded parameters from the query string and request body.
Public variables and functions: assoc-form-params assoc-query-params params-request wrap-params
Middleware that reloads modified namespaces on each request.
This middleware should be limited to use in development environments.
Public variables and functions: wrap-reload
Middleware for serving static resources.
Public variables and functions: resource-request wrap-resource
Middleware for maintaining browser sessions using cookies.
Sessions are stored using types that adhere to the ring.middleware.session.store/SessionStore protocol. Ring comes with two stores included:
ring.middleware.session.memory/memory-store ring.middleware.session.cookie/cookie-store
Public variables and functions: session-request session-response wrap-session
A session storage engine that stores session data in encrypted cookies.
Public variables and functions: cookie-store
A session storage engine that stores session data in memory.
Public variables and functions: memory-store
Contains the protocol used to define all Ring session storage engines.
Public variables and functions: SessionStore
Middleware that catches exceptions thrown by the handler, and reports the error and stacktrace via a webpage and STDERR log.
This middleware is for debugging purposes, and should be limited to development environments.
Public variables and functions: wrap-stacktrace wrap-stacktrace-log wrap-stacktrace-web
Utility functions for handling I/O.
Public variables and functions: close! last-modified-date piped-input-stream string-input-stream
Utility functions for determining the mime-types files.
Public variables and functions: default-mime-types ext-mime-type
Regular expressions for parsing HTTP.
For internal use.
Public variables and functions: find-content-type-charset re-charset re-quoted re-token re-value
Functions for augmenting and pulling information from request maps.
Public variables and functions: body-string character-encoding content-length content-type in-context? path-info request-url set-context urlencoded-form?
Functions for generating and augmenting response maps.
Public variables and functions: bad-request charset content-type created file-response find-header get-charset get-header header not-found redirect redirect-after-post redirect-status-codes resource-data resource-response response response? set-cookie status update-header url-response
Compatibility functions for turning a ring handler into a Java servlet.
Public variables and functions: build-request-map defservice make-service-method merge-servlet-keys servlet update-servlet-response
Utilities for testing Ring components.
All functions in this namespace are currently deprecated.
Public variables and functions: string-input-stream
Functions for dealing with time and dates in HTTP requests.
Public variables and functions: format-date parse-date
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close