Guest User

Untitled

a guest
Apr 26th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. require 'rack/request'
  2.  
  3. module Rort::Http
  4. class Download
  5. include Rort::Http
  6.  
  7. def call(env)
  8. Rort.logger(:post).info env['rack.input'].read.inspect
  9. req = Rack::Request.new(env)
  10. Rort.logger(:post).info req.params.inspect
  11.  
  12. # ....
  13. end
  14. end
  15. end
  16.  
  17. ## form:
  18.  
  19. <form action="/" method="post">
  20. <label for="download">Download:</label>
  21. <input type="text" name="download" id="download">
  22. <input type="submit" value="Last ned!">
  23. </form>
  24.  
  25. ## log output:
  26. I, [2008-05-25T17:53:55.029476 #32200] INFO -- : "download=eu%40red.com"
  27. I, [2008-05-25T17:53:55.029750 #32200] INFO -- : {}
Add Comment
Please, Sign In to add comment