るりまサーチ

最速Rubyリファレンスマニュアル検索!
33件ヒット [1-33件を表示] (0.040秒)
トップページ > クエリ:IO[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 (21227.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 Found readbody=true>
end
//}...

Net::HTTPResponse#http_version -> String (9120.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 (6202.0)

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

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

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

@see Net::HTTP::Options...