class Puma::DSL
def supported_http_methods(methods)
- Example: Allows any method -
Example: Restricts methods to the methods in the IANA Registry -
Example: Restricts methods to the array elements -
Example: Adds 'PROPFIND' to existing supported methods -
Other tags:
- Note: - If the `methods` value is `:any`, no method check with be performed,
def supported_http_methods(methods) if methods == :any @options[:supported_http_methods] = :any elsif Array === methods && methods == (ary = methods.grep(String).uniq) && !ary.empty? @options[:supported_http_methods] = ary else raise "supported_http_methods must be ':any' or a unique array of strings" end end