A utility to help with mime type detection for a given file path or url.
Nice trick from Miles Sabin using ambiguity in implicit resolution to disallow Nothing
Logs request information using slf4j with "REQUEST" logger name by mixing-in this trait to scalatra servlet or filter.
Inspired by Rails' MapWithIndifferentAccess, allows the substitution of symbols for strings as map keys.
(Since version 2.7.0) MutableMapWithIndifferentAccess is deprecated from Scalatra 2.7.0. It will be deleted in the next major version. Please unify the key type of Map to either String or Symbol.
MapWithIndifferentAccess
Extractor object, useful for handling empty form parameter submissions:
Extractor object, useful for handling empty form parameter submissions:
params.get("foo") match { case NotEmpty(value) => processValue(value) case _ => message("foo is required") }
A collection of I/O utility methods.
Inspired by Rails' MapWithIndifferentAccess, allows the substitution of symbols for strings as map keys. Note that the map is still keyed with strings; symbols are stored in permgen, so symbol keys maps should not be used for maps with arbitrary keys. There is no performance gain using symbols. It is here to make our Rubyists feel more at home.
(Since version 2.7.0) MapWithIndifferentAccess is deprecated from Scalatra 2.7.0. It will be deleted in the next major version. Please unify the key type of Map to either String or Symbol.