るりまサーチ (Ruby 2.5.0)

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

別のキーワード

  1. httpresponse http_version
  2. httpresponse header
  3. httpresponse read_body
  4. httpresponse body
  5. webrick/httpresponse content_length=

クラス

検索結果

WEBrick::HTTPResponse#content_length=(len) (108325.0)

Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。

...まれません。

@param len ヘッダの値を整数で指定します。nil を指定することは出来ません。

require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
f = File.new('testfile')
res.body = f
res.content_length = 2
print res.to_s...

WEBrick::HTTPResponse#content_length -> Integer | nil (63025.0)

Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。

...まれません。

@param len ヘッダの値を整数で指定します。nil を指定することは出来ません。

require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
f = File.new('testfile')
res.body = f
res.content_length = 2
print res.to_s...