るりまサーチ (Ruby 2.7.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.033秒)
トップページ > ライブラリ:net/http[x] > バージョン:2.7.0[x] > クエリ:net/http[x] > クエリ:get[x] > クエリ:content_length[x]

別のキーワード

  1. net/http get
  2. net/http start
  3. http get
  4. http start
  5. net/http set_range

モジュール

キーワード

検索結果

Net::HTTPHeader#content_length -> Integer|nil (78400.0)

Content-Length: ヘッダフィールドの表している値を整数で返します。

...rSyntaxError フィールドの値が不正である場合に
発生します。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_length # => nil
req.content_length...

Net::HTTPHeader#content_length=(len) (42400.0)

Content-Length: ヘッダフィールドに値を設定します。

...tent-Length: ヘッダフィールドを
削除します。

@param len 設定する値を整数で与えます。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_length # => nil
req.content_len...

Net::HTTPHeader#delete(key) -> [String] | nil (24097.0)

key ヘッダフィールドを削除します。

...ます。
key ヘッダフィールドが存在しなかった場合には
nil を返します。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_length = 10
req.content_length # =>...