るりまサーチ (Ruby 2.6.0)

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

別のキーワード

  1. open3 popen2e
  2. socket af_e164
  3. matrix det_e
  4. matrix rank_e
  5. open3 capture2e

ライブラリ

検索結果

Net::HTTPExceptions#response -> Net::HTTPResponse (18643.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
//}