るりまサーチ

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

別のキーワード

  1. _builtin to_h
  2. hash to_h
  3. env to_h
  4. struct to_h
  5. array to_h

ライブラリ

クラス

検索結果

WEBrick::HTTPResponse#status_line -> String (27307.0)

HTTP のステータスラインを CR+LF 付き文字列で返します。

...
H
TTP のステータスラインを 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"...