Pretty simple Sinatra code
get '/Accept/:value' do
"Hello world"
end
not_found do
"not found"
end
when I go to http://localhost:9292/Accept/?SomeKey=somevalue&Somekey2=someValue Sinatra always returns “not found” back to me.
What am I doing wrong?
Sinatra sees your url as
/Accept/because you follow the last slash immediately with the?denoting the start of the query string.A url like:
http://localhost:9292/Accept/foo?SomeKey=somevalue&Somekey2=someValuewill hit the get action, passingfooasparams[:value].