Snappy Clojure library for managing (http) api-formats. Provides adapters for both ring, async-ring and pedestal.
Design goals:
- explicit configuration, no shared mutable state
- pragmatic & fast over 100% compliancy with HTTP spec
- extendable & pluggable: new formats, behavior
- standalone + adapters for both ring (middleware) and pedestal (interceptors)
- replacement for ring-middleware-defaults
TODO
- Ring compatible middleware, works with any web framework build on top of Ring
- Automatically parses requests and encodes responses according to Content-Type and Accept headers
- Automatically handles charset detection of requests bodies, even if the charset given by the MIME type is absent or wrong (using ICU)
- Automatically selects and uses the right charset for the response according to the request header
- Varied formats handled out of the box (JSON, MessagePack, YAML, EDN, Transit over JSON or Msgpack)
- Pluggable system makes it easy to add to the standards encoders and decoders custom ones (proprietary format, Protobuf, specific xml, csv, etc.)
Full API documentation is available.
Copyright © 2011, 2012, 2013, 2014 Nils Grunwald
Copyright © 2015, 2016 Juho Teperi
Copyright © 2016 Metosin
Distributed under the Eclipse Public License, the same as Clojure.