るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.030秒)
トップページ > クエリ:IO[x] > バージョン:2.5.0[x] > クエリ:response[x] > ライブラリ:net/http[x]

別のキーワード

  1. io popen
  2. io pipe
  3. io readlines
  4. io each
  5. io each_line

クラス

モジュール

キーワード

検索結果

Net::HTTPExceptions#response -> Net::HTTPResponse (63682.0)

例外の原因となったレスポンスオブジェクトを返します。

...例外の原因となったレスポンスオブジェクトを返します。

//emlist[例][ruby]{
require 'net/http'

uri = "http://www.example.com/invalid.html"
response = Net::HTTP.get_response(URI.parse(uri))
begin
response.value
rescue => e
e.response # => #<Net::HTTPNotFound 404 Not Fou...

Net::HTTPResponse#http_version -> String (27361.0)

サーバがサポートしている HTTP のバージョンを文字列で返します。

...サーバがサポートしている HTTP のバージョンを文字列で返します。

//emlist[例][ruby]{
require 'net/http'

uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.http_version # => "1.1"
//}...

Net::HTTP#options(path, initheader = nil) -> Net::HTTPResponse (18607.0)

サーバの path に OPTIONS リクエストを ヘッダが initheader として送り、 レスポンスを Net::HTTPResponse のオブジェクト で返します。

サーバの path に OPTIONS リクエストを
ヘッダが initheader として送り、
レスポンスを Net::HTTPResponse のオブジェクト
で返します。

@param path リクエストを送るパスを文字列で与えます。
@param initheader リクエストのヘッダを「文字列=>文字列」の
ハッシュで与えます。

@see Net::HTTP::Options