Posted On: Feb 22, 2018
get '/hello-world' do request.path_info # => '/hello-world' request.fullpath # => '/hello-world?foo=bar' request.url # => 'http://example.com/hello-world?foo=bar' end
Never Miss an Articles from us.
Sinatra is web application framework for rapidly building applications in Ruby.Sinatra is a domain specific language or..
By default, Sessions are disabled in Sinatra.You need to enable them and then use the session hash from routes and view..
Rack:: Flash is used to flash a message in Sinatra.Example Usage :require 'sinatra/base' require 'rack-flash'class My..