るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.133秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:ruby[x] > クエリ:r[x] > モジュール:Net::HTTPExceptions[x]

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

検索結果

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

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

...レスポンスオブジェクトを返します。

//emlist[例][ruby]{
r
equire 'net/http'

uri = "http://www.example.com/invalid.html"
r
esponse = Net::HTTP.get_response(URI.parse(uri))
begin
r
esponse.value
r
escue => e
e.response # => #<Net::HTTPNotFound 404 Not Found readbody=true>
end
//}...