<commit_before>ring-transit-middleware
=======================

image:https://travis-ci.org/muhuk/ring-transit-middleware.svg?branch=master["Build Status", link=https://travis-ci.org/muhuk/ring-transit-middleware]
image:http://b.repl.ca/v1/doc-API-blue.png["API Documentation", link=http(s)://muhuk.github.io/ring-transit-middleware]


Ring middleware for Transit requests & responses.


Latest Release
--------------

Leiningen
~~~~~~~~~

Add this to your `:dependencies` in `project.clj`:

image:http://clojars.org/ring-transit-middleware/latest-version.svg["Clojars Project", link=http://clojars.org/ring-transit-middleware]



Usage
-----

Defaults should work fine for most use cases:


[source, Clojure]
----
(require '[ring.middleware.transit :refer [wrap-transit]])


(defn handler [request]
  (let [username (get-in request [:params :username])]
    {:hello username}))


(defn app
  (-> handler
      (wrap-transit)))
----

The handler above would accept transit requests and it would encode clojure
data structures like maps and vectors into transit. See API documentation for
more info.

`wrap-transit` also accepts an options map, see API documentation for more info.


Aleph
~~~~~

`wrap-transit` is compatible with link:http://aleph.io/[Aleph]'s deferred
responses. It should just work out of the box.


See Also
--------

* link:https://github.com/jalehman/ring-transit/[ring-transit]


License
-------

Copyright (C) 2015 <NAME>

Distributed under The MIT License, same as Ring. See `LICENSE` file.
<commit_msg>Fixed API docs link.<commit_after>ring-transit-middleware
=======================

image:https://travis-ci.org/muhuk/ring-transit-middleware.svg?branch=master["Build Status", link=https://travis-ci.org/muhuk/ring-transit-middleware]
image:http://b.repl.ca/v1/doc-API-blue.png["API Documentation", link=http://muhuk.github.io/ring-transit-middleware]


Ring middleware for Transit requests & responses.


Latest Release
--------------

Leiningen
~~~~~~~~~

Add this to your `:dependencies` in `project.clj`:

image:http://clojars.org/ring-transit-middleware/latest-version.svg["Clojars Project", link=http://clojars.org/ring-transit-middleware]



Usage
-----

Defaults should work fine for most use cases:


[source, Clojure]
----
(require '[ring.middleware.transit :refer [wrap-transit]])


(defn handler [request]
  (let [username (get-in request [:params :username])]
    {:hello username}))


(defn app
  (-> handler
      (wrap-transit)))
----

The handler above would accept transit requests and it would encode clojure
data structures like maps and vectors into transit. See API documentation for
more info.

`wrap-transit` also accepts an options map, see API documentation for more info.


Aleph
~~~~~

`wrap-transit` is compatible with link:http://aleph.io/[Aleph]'s deferred
responses. It should just work out of the box.


See Also
--------

* link:https://github.com/jalehman/ring-transit/[ring-transit]


License
-------

Copyright (C) 2015 <NAME>

Distributed under The MIT License, same as Ring. See `LICENSE` file.

{'fraction_non_alphanumeric': 0.1676470588235294, 'fraction_numerical': 0.0032679738562091504, 'mean_word_length': 3.961102106969206, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5026842', 'n_tokens_mistral': 1028, 'n_tokens_neox': 976, 'n_words': 261}