るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.050秒)
トップページ > クエリ:IO[x] > クエリ:io[x] > バージョン:2.6.0[x] > ライブラリ:webrick[x] > クエリ:content_length=[x]

別のキーワード

  1. io popen
  2. io pipe
  3. io readlines
  4. io each_line
  5. io each

クラス

検索結果

WEBrick::HTTPResponse#content_length=(len) (45430.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 (130.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...