るりまサーチ

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

別のキーワード

  1. _builtin bytes
  2. stringio bytes
  3. string bytes
  4. securerandom random_bytes
  5. random bytes

ライブラリ

検索結果

Net::HTTPHeader#range_length -> Integer|nil (24227.0)

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

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

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

@
raise Net::HTTPHeaderSyntaxError Content-Range: ヘッダフィールド
の値が不正である...
...発生します。


//emlist[例][ruby]{
r
equire 'net/http'

uri = URI.parse('http://www.example.com/index.html')
r
eq = Net::HTTP::Get.new(uri.request_uri)
r
eq['Content-Range'] = "bytes 1-500/1000"
r
eq.range_length # => 500
//}...