added support for sinatra requests