Module: Roda::RodaPlugins::Unpoly::RequestMethods
- Extended by:
- Forwardable
- Defined in:
- lib/roda/plugins/unpoly.rb
Instance Method Summary collapse
-
#unpoly ⇒ Object
Send the appropriate headers and cookies back to the client in order to satisfy the contract of the Unpoly library.
-
#up ⇒ Object
An instance of the
Inspector
.
Instance Method Details
#unpoly ⇒ Object
Send the appropriate headers and cookies back to the client in order to satisfy the contract of the Unpoly library. Called early in your routing tree.
70 71 72 73 74 75 76 77 78 79 |
# File 'lib/roda/plugins/unpoly.rb', line 70 def unpoly response.headers["X-Up-Location"] = url response.headers["X-Up-Method"] = request_method if !get? && !unpoly? Rack::Utils.(response.headers, "_up_method", { value: request_method, path: "/" }) else Rack::Utils.(response.headers, "_up_method", { path: "/" }) end end |