module ActionDispatch::Routing::Mapper::HttpHelpers
def connect(*args, &block)
see [match](rdoc-ref:Base#match)
CONNECT requests with the protocol pseudo header. For supported arguments,
specifically this recognizes HTTP/1 protocol upgrade requests and HTTP/2
Define a route that recognizes HTTP CONNECT (and GET) requests. More
def connect(*args, &block) map_method([:get, :connect], args, &block) end
def delete(*args, &block)
[match](rdoc-ref:Base#match)
Define a route that only recognizes HTTP DELETE. For supported arguments, see
def delete(*args, &block) map_method(:delete, args, &block) end
def get(*args, &block)
[match](rdoc-ref:Base#match)
Define a route that only recognizes HTTP GET. For supported arguments, see
def get(*args, &block) map_method(:get, args, &block) end
def map_method(method, args, &block)
def map_method(method, args, &block) options = args.extract_options! options[:via] = method match(*args, options, &block) self end
def options(*args, &block)
[match](rdoc-ref:Base#match)
Define a route that only recognizes HTTP OPTIONS. For supported arguments, see
def options(*args, &block) map_method(:options, args, &block) end
def patch(*args, &block)
[match](rdoc-ref:Base#match)
Define a route that only recognizes HTTP PATCH. For supported arguments, see
def patch(*args, &block) map_method(:patch, args, &block) end
def post(*args, &block)
[match](rdoc-ref:Base#match)
Define a route that only recognizes HTTP POST. For supported arguments, see
def post(*args, &block) map_method(:post, args, &block) end
def put(*args, &block)
[match](rdoc-ref:Base#match)
Define a route that only recognizes HTTP PUT. For supported arguments, see
def put(*args, &block) map_method(:put, args, &block) end