4件ヒット
[1-4件を表示]
(0.057秒)
種類
- インスタンスメソッド (3)
- 特異メソッド (1)
ライブラリ
- ビルトイン (1)
-
webrick
/ httpresponse (3)
クラス
- SystemExit (1)
-
WEBrick
:: HTTPResponse (3)
キーワード
-
reason
_ phrase= (1) -
status
_ line (1)
検索結果
先頭4件
-
WEBrick
:: HTTPResponse # status=(status) (54337.0) -
レスポンスのステータスコードを整数で指定します。 reason_phrase も適切なものに設定されます。
レスポンスのステータスコードを整数で指定します。
reason_phrase も適切なものに設定されます。
@param status ステータスコードを整数で指定します。
require 'webrick'
res = WEBrick::HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.status = 404
p res.reason_phrase #=> "Not Found" -
SystemExit
. new(status = 0 , error _ message = "") -> SystemExit (54325.0) -
SystemExit オブジェクトを生成して返します。
SystemExit オブジェクトを生成して返します。
@param status 終了ステータスを整数で指定します。
@param error_message エラーメッセージを文字列で指定します。
例:
ex = SystemExit.new(1)
p ex.status # => 1 -
WEBrick
:: HTTPResponse # reason _ phrase=(val) (37.0) -
HTTP のレスポンスの最初の行の reason phrase をセットします。 この値が nil の場合 reason phrase は status から生成されます。 デフォルトは nil です。
HTTP のレスポンスの最初の行の reason phrase をセットします。
この値が nil の場合 reason phrase は status から生成されます。
デフォルトは nil です。
@param val reason phrase を表す文字列を指定します。
require 'webrick'
res = WEBrick::HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.status = 404
p res.reason_phrase #=> "Not Found" -
WEBrick
:: HTTPResponse # status _ line -> String (37.0) -
HTTP のステータスラインを CR+LF 付き文字列で返します。
HTTP のステータスラインを CR+LF 付き文字列で返します。
require 'webrick'
res = WEBrick::HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.status = 404
p res.status_line #=> "HTTP/1.1 404 Not Found \r\n"