るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.031秒)
トップページ > バージョン:2.6.0[x] > クエリ:raise[x] > クエリ:content_length[x]

別のキーワード

  1. rss content
  2. rss content=
  3. net/imap content_id
  4. rss20 content=
  5. item content=

ライブラリ

モジュール

検索結果

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

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

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

ヘッダが設定されていない場合には nil を返します。

@raise Net::HTTPHeaderSyntaxError フィールドの値が不正である場合に
発生します。

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

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

OpenURI.open_uri(name, mode = 'r', perm = nil, options = {}) -> StringIO (109.0)

URI である文字列 name のリソースを取得して StringIO オブジェクト として返します。

URI である文字列 name のリソースを取得して StringIO オブジェクト
として返します。

ブロックを与えた場合は StringIO オブジェクトを引数としてブロックを
評価します。ブロックの終了時に StringIO は close されます。nil を返します。

require 'open-uri'
sio = OpenURI.open_uri('http://www.example.com')
p sio.last_modified
puts sio.read

OpenURI.open_uri('http://www.example.com'){|...

OpenURI.open_uri(name, mode = 'r', perm = nil, options = {}) {|sio| ... } -> nil (109.0)

URI である文字列 name のリソースを取得して StringIO オブジェクト として返します。

URI である文字列 name のリソースを取得して StringIO オブジェクト
として返します。

ブロックを与えた場合は StringIO オブジェクトを引数としてブロックを
評価します。ブロックの終了時に StringIO は close されます。nil を返します。

require 'open-uri'
sio = OpenURI.open_uri('http://www.example.com')
p sio.last_modified
puts sio.read

OpenURI.open_uri('http://www.example.com'){|...