22件ヒット
[1-22件を表示]
(0.067秒)
検索結果
-
Net
:: HTTPRetriableError (24000.0) -
HTTP ステータスコード 3xx を受け取ったという例外です。
HTTP ステータスコード 3xx を受け取ったという例外です。
リソースが移動したなどの理由により、リクエストを完了させるには更な
るアクションが必要になります。 -
Net
:: HTTPResponse # value -> nil (6106.0) -
レスポンスが 2xx(成功)でなかった場合に、対応する 例外を発生させます。
...生します。
@raise HTTPRetriableError レスポンスが 3xx である場合に発生します。
@raise HTTPServerException レスポンスが 4xx である場合に発生します。
@raise HTTPFatalError レスポンスが 5xx である場合に発生します。
//emlist[例 レスポンス......www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.value # => nil
//}
//emlist[例 レスポンスが 2xx以外][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.class # => Net::HTTPServerException
e.message # => 404 "Not Found"
end
//}...