Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove json_prettify_middleware.rb.

  • Loading branch information...
commit 18c29987371be0c3f46ac8caadf1af38c9c6bf1b 1 parent 2858d12
@nelstrom authored
Showing with 0 additions and 16 deletions.
  1. +0 −16 lib/json_prettify_middleware.rb
View
16 lib/json_prettify_middleware.rb
@@ -1,16 +0,0 @@
-require "json"
-
-class JsonPrettifyMiddleware
- def initialize(app)
- @app = app
- end
-
- def call(env)
- status, headers, response = @app.call(env)
- if headers["Content-Type"].include? "application/json"
- objects = JSON.parse response.first
- response = JSON.pretty_generate(objects)
- end
- [status, headers, response]
- end
-end
Please sign in to comment.
Something went wrong with that request. Please try again.