We’ve found 18 wiki results

Concepts
Last updated Aug 7, 2011.

A web application developed for Ring consists of four components: Handler Request Response Middleware Handlers Handlers are functions that define your web application. They take one argument, a map representing ...

Content Types
Last updated May 30, 2014.

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)) ...

Cookies
Last updated Oct 16, 2011.

To add cookie support to your Ring handler, you'll need to wrap it in the wrap-cookies middleware: ( use 'ring.middleware.cookies) ( def app ( wrap-cookies your-handler)) This adds the :cookies ...

Creating responses
Last updated May 27, 2015.

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 ...

Examples
Last updated Oct 2, 2010.

Hello World Hello World with ring.util.response Form parameters Sessions

File Uploads
Last updated Oct 29, 2011.

Uploading a file to a website requires multipart form handling, which Ring provides with its wrap-multipart-params middleware. ( use 'ring.middleware.params 'ring.middleware.multipart-params) ...

Getting Started
Last updated Apr 22, 2012.

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 " ...

Home
Last updated Mar 7, 2013.

Moved to https://github.com/ring-clojure/ring/wiki

Interactive Development
Last updated Feb 11, 2013.

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 ...

Middleware Patterns
Last updated Nov 6, 2010.

Adding keys to the request map Keys can be added to the request map to pass additonal information to the handler and other middleware. Here is an example that adds a :user key to the request, if there ...