Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rack/request'
- module Rort::Http
- class Download
- include Rort::Http
- def call(env)
- Rort.logger(:post).info env['rack.input'].read.inspect
- req = Rack::Request.new(env)
- Rort.logger(:post).info req.params.inspect
- # ....
- end
- end
- end
- ## form:
- <form action="/" method="post">
- <label for="download">Download:</label>
- <input type="text" name="download" id="download">
- <input type="submit" value="Last ned!">
- </form>
- ## log output:
- I, [2008-05-25T17:53:55.029476 #32200] INFO -- : "download=eu%40red.com"
- I, [2008-05-25T17:53:55.029750 #32200] INFO -- : {}
Add Comment
Please, Sign In to add comment