るりまサーチ

最速Rubyリファレンスマニュアル検索!
59件ヒット [1-59件を表示] (0.017秒)
トップページ > クエリ:Exception[x] > クエリ:response[x]

別のキーワード

  1. _builtin exception
  2. exception exception
  3. bigdecimal exception_nan
  4. bigdecimal exception_all
  5. thread abort_on_exception

ライブラリ

モジュール

検索結果

Net::HTTPExceptions#response -> Net::HTTPResponse (21225.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/http (54.0)

汎用データ転送プロトコル HTTP を扱うライブラリです。 実装は 2616 に基きます。

...choose better exception.
raise ArgumentError, 'HTTP redirect too deep' if limit == 0

response
= Net::HTTP.get_response(URI.parse(uri_str))
case response
when Net::HTTPSuccess
response

when Net::HTTPRedirection
fetch(response['location'], limit - 1)
else
response
.value
end...
...et::HTTPResponse、 Net::HTTPSuccess、
Net::HTTPRedirection を参照してください。

==== Basic 認証

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

Net::HTTP.start('www.example.com') {|http|
req = Net::HTTP::Get.new('/secret-page.html')
req.basic_auth 'account', 'password'
response
= http...
....request(req)
print response.body
}
//}





=== フォームの値の区切り文字について

POSTで application/x-www-form-urlencoded として複数のフォームの値を送る場合、
現在広く行なわれているのは、 name0=value0&name1=value1 のようにアンパサンド
(`...

制御構造 (24.0)

制御構造 条件分岐: * if * unless * case 繰り返し: * while * until * for * break * next * redo * retry 例外処理: * raise * begin その他: * return * BEGIN * END

...である場合にはそれを最初に一回評価してから繰り返します。

//emlist[例][ruby]{
send_request(data)
begin
res = get_response()
end while res == 'Continue'
//}

while 修飾した式は nil を返します。
また、引数を伴った break により while 修飾した...
...である場合にはそれを最初に一回評価してから繰り返します。

//emlist[例][ruby]{
send_request(data)
begin
res = get_response()
end until res == 'OK'
//}

until 修飾した式は nil を返します。
また、引数を伴った break により until 修飾した式の...
...る処理が成功するまで処理を繰り返すようなループを作
ることができます。

//emlist[][ruby]{
begin
do_something # exception raised
rescue
# handles error
retry # restart from beginning
end
//}

rescue 節以外で retry が用いられた場合には例外 Syntax...

ruby 1.9 feature (18.0)

ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。

...:23063>))

=== 2004-04-06
: Kernel#open [ruby] [change]
可能なら最初の引数に対して to_open を呼ぶようになりました。

: Exception#to_str [ruby] [obsolete]

=== 2004-03-31
: Array#pack [ruby] [change]
pack("U") 時に、ユニコードとして不適切な値が来てい...
...ebDAV methods, PROPPATCH, LOCK, UNLOCK, OPTIONS, PROPFIND,
DELETE, MOVE, COPY, MKCOL.

: Net::HTTPResponse#response [lib] [obsolete]
: Net::HTTPResponse#header [lib] [obsolete]
: Net::HTTPResponse#read_header [lib] [obsolete]

=== 2004-02-16

: Iconv.list [lib] [new]

: ((<IO/IO.popen>))...
...7
: NameError [ruby]
((<ruby-dev:22604>))

=== 2004-01-14
: SystemStackError [ruby] [change]
SystemStackError が StandardError ではなく Exception の直下になりました。
((<ruby-talk:89782>))

=== 2004-01-13
: Pathname#world_readable? [lib] [new]
: Pathname#world_writable? [lib]...

NEWS for Ruby 3.0.0 (12.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...Net::HTTP#verify_hostname= and Net::HTTP#verify_hostname have been added to skip hostname verification. 16555
* Net::HTTP.get, Net::HTTP.get_response, and Net::HTTP.get_print can take the request headers as a Hash in the second argument when the first argument is a URI. 16686
* Net::SMTP...
...y2_keywords` will no longer keep empty keyword splats, those are now removed just as they are for methods not using `ruby2_keywords`.
* When an exception is caught in the default handler, the error message and backtrace are printed in order from the innermost. 8661
* Accessing an uninitialized i...

絞り込み条件を変える

ruby 1.8.3 feature (12.0)

ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))

...IND, DELETE, MOVE, COPY, MKCOL。

: Net::HTTPRequest#body_exist? [lib] [obsolete]
: Net::HTTPResponse#response [lib] [obsolete]
: Net::HTTPResponse#header [lib] [obsolete]
: Net::HTTPResponse#read_header [lib] [obsolete]

obsolete になりました。VERBOSE モードの時、警告...
...SystemCallError
: SystemExit
各例外クラスのインスタンスが生成される時に、親クラスのコンストラクタ
である Exception#initialize が呼ばれるようになりました。((<ruby-talk:142593>)) ((<ruby-dev:26177>))

=== 2005-05-11
: break [ruby] [bug]
メソ...