るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.076秒)

別のキーワード

  1. stringio print
  2. _builtin print
  3. cgi print
  4. http get_print
  5. net/http get_print

ライブラリ

クラス

検索結果

WEBrick::HTTPResponse#chunked=(flag) (18113.0)

真に設定するとクライアントに返す内容(エンティティボディ)を chunk に分けるようになります。

...に返します。

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

#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 09:04:28 GMT
Server:
Transfer-Encoding...