diff --git a/README.rdoc b/README.rdoc index 807dbb80..a7c94c2e 100644 --- a/README.rdoc +++ b/README.rdoc @@ -848,6 +848,20 @@ Similar to +body+, you can also set the status code and headers: Like +body+, +headers+ and +status+ with no arguments can be used to access their current values. +=== Mime Types + +When using send_file or static files you may have mime types Sinatra +doesn't understand. Use +mime_type+ to register them by file extension: + + mime_type :foo, 'text/foo' + +You can also use it with the +content_type+ helper: + + get '/' do + content_type :foo + "foo foo foo" + end + === Generating URLs For generating URLs you should use the +url+ helper method, for instance, in @@ -1216,17 +1230,6 @@ Or a range: Sinatra installs special not_found and error handlers when running under the development environment. -== Mime Types - -When using send_file or static files you may have mime types Sinatra -doesn't understand. Use +mime_type+ to register them by file extension: - - mime_type :foo, 'text/foo' - -You can also use it with the +content_type+ helper: - - content_type :foo - == Rack Middleware Sinatra rides on Rack[http://rack.rubyforge.org/], a minimal standard