るりまサーチ

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

別のキーワード

  1. open3 popen2e
  2. socket af_e164
  3. matrix rank_e
  4. matrix det_e
  5. open3 capture2e

検索結果

<< < ... 2 3 4 >>

WEBrick::HTTPResponse#status=(status) (3006.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"...

WEBrick::HTTPResponse#to_s -> String (3006.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:49 GMT
Server:
Content-Length: 4

hoge...
<< < ... 2 3 4 >>