type=class
superclass=Net=HTTPGenericRequest
included=
extended=
dynamically_included=
dynamically_extended=
library=net.http
aliases=
aliasof=

HTTP リクエストを抽象化するクラスです。

Net::HTTPRequest は抽象クラスなので実際にはサブクラスの

  * [[c:Net::HTTP::Get]]
  * [[c:Net::HTTP::Head]]
  * [[c:Net::HTTP::Post]]
  * [[c:Net::HTTP::Put]]
  * [[c:Net::HTTP::Copy]]
  * [[c:Net::HTTP::Delete]]
  * [[c:Net::HTTP::Lock]]
  * [[c:Net::HTTP::Mkcol]]
  * [[c:Net::HTTP::Move]]
  * [[c:Net::HTTP::Options]]
  * [[c:Net::HTTP::Propfind]]
  * [[c:Net::HTTP::Proppatch]]
  * [[c:Net::HTTP::Trace]]
  * [[c:Net::HTTP::Unlock]]

を使用してください。

=== 例

  require 'net/http'
  http = Net::HTTP.new('www.example.com', 80)
  req = Net::HTTP::Get.new('/somefile')
  res = http.request(req)
  print res.body
