instance method Net::HTTPHeader#method

method -> String[permalink][rdoc][edit]

リクエストの HTTP メソッドを文字列で返します。



require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.method # => "GET"