るりまサーチ

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

別のキーワード

  1. httpversion <=>
  2. httpversion new
  3. httpversion to_s
  4. httpversion major
  5. httpversion minor

検索結果

<< < ... 2 3 4 >>

WEBrick::HTTPResponse#status_line -> String (6.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"...

WEBrick::HTTPResponse#to_s -> String (6.0)

実際にクライアントに送られるデータを文字列として返します。

...ライアントに送られるデータを文字列として返します。

require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.body = 'hoge'
print res.to_s

#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 08:58:...
<< < ... 2 3 4 >>