Creating responses
Last updated
You can create Ring response maps manually (see Concepts ), but the ring.util.response namespace contains a number of useful function to make this task easier. The response function creates a basic "200 ...
Sessions
Last updated
Sessions in Ring work a little differently than you might expect, because Ring attempts to be functional when possible. Session data is passed via the request map on the :session key. The following example ...
Content Types
Last updated
You can use the wrap-content-type middleware to add a Content-Type header based on the file extension in the URI: ( use 'ring.middleware.content-type) ( def app ( wrap-content-type your-handler)) ...
Home
Last updated
Moved to https://github.com/ring-clojure/ring/wiki
Interactive Development
Last updated
When developing with Ring, you may find yourself wanting to reload your source files without restarting your development server. There are three ways of doing this: I. Using Lein-Ring The easiest way is ...
Third Party Libraries
Last updated
Adapters ring-netty-adapter : Netty adapter ring-mongrel2-adapter : Mongrel2 adapter ring-finagle-adapter : Finagle adapter Frameworks Compojure : A concise DSL to generate Ring handler functions Moustache ...
Getting Started
Last updated
Create a new project with Leiningen . $ lein new hello-world $ cd hello-world Add ring-core and ring-jetty-adapter as a dependencies in project.clj . ( defproject hello-world " 1.0.0-SNAPSHOT " ...
Parameters
Last updated
URL-encoded parameters are the primary way browsers pass values to web applications. They are sent when a user submits a form, and are usually used for things like pagination. Because Ring is a low level ...
Static Resources
Last updated
Web applications often need to serve static content, such as images or stylesheets. Ring provides two middleware functions to do this. One is wrap-file . This serves static content from a directory on ...
Why Use Ring?
Last updated
Using Ring as the basis for your web application has a number of benefits: Write your application using Clojure functions and maps Run your application in a auto-reloading development server Compile your ...