Liking cljdoc? Tell your friends :D

ring-lib

Opinionated implementations for Clojure ring handler.

Clojars Project

cljdoc badge

Motivation

Being not satisfied with come decisions/implementations in existing Ring libraries.

API

Middlewares

params

The alternative implementation of the params middleware.

  • Name dependent detection if param is single value or collection, by default only names with [] suffix has collection value.
  • Lazy evaluation of request keys.
  • Allows to customize param names with collection values.
  • Allows to define coercion function for param names, i.e. to keywordize them.
  • Adds :form-params which is :query-params for GET requests and :body-params for POST request with “application/x-www-form-urlencoded” content type.
  • Adds :path-or-query-params which contains params from URL but not body.
  • Does not add :params as merge of everything else because it is considered confusing.
  • Optimized for performance.

Benchmarks

Can you improve this documentation? These fine people already did:
Sergey Trofimov & serioga
Edit on GitHub

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

× close