るりまサーチ

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

別のキーワード

  1. _builtin >
  2. bigdecimal >
  3. comparable >
  4. integer >
  5. complex >

ライブラリ

モジュール

キーワード

検索結果

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

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

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

: body が String オブジェクトである場合
content_length
の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実...
...オブジェクトである場合
content_length
の値が nil のとき Content-Length ヘッダはレスポンスに含まれず、IO から全てを読み込ん
でそれをエンティティボディとします。nil でないとき IO から content_length バイトだけ読み込みそ...
...
content_length
の値は無視され Content-Length ヘッダはレスポンスに含まれません。

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

require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1"...

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

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

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

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

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

//emli...
...st[例][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 = 10
req.content_length # => 10
//}...

CGI::QueryExtension#content_length -> Integer (24317.0)

ENV['CONTENT_LENGTH'] を返します。

...ENV['CONTENT_LENGTH'] を返します。...

WEBrick::HTTPRequest#content_length -> Integer (24301.0)

リクエストの Content-Length ヘッダの値を整数で返します。リクエストに Content-Length ヘッダ が含まれていない場合は 0 を返します。

...リクエストの Content-Length ヘッダの値を整数で返します。リクエストに Content-Length ヘッダ
が含まれていない場合は 0 を返します。...

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

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 # => 10
req.delete("Content-Length") # => ["10"]
req.content_length # => nil
//}...

絞り込み条件を変える

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

URI である文字列 name のリソースを取得して 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'){|sio| sio.read }

options には Hash を与...
...シンボル、
* :proxy
* :progress_proc
* :content_length_proc
* :http_basic_authentication
* :proxy_http_basic_authentication
* :read_timeout
* :ssl_ca_cert
* :ssl_verify_mode
* :ftp_active_mode
* :redirect
です。
「:content_length_proc」と「:progress_proc」はプログレスバ...
...('http://www.example.com',
{ :proxy => 'http://proxy.example.com:8000/',
:http_basic_authentication => [username, password] })

: :proxy
プロクシの設定をします。
値には以下のいずれかを与えます。
//emlist{
文字列:...

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

URI である文字列 name のリソースを取得して 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'){|sio| sio.read }

options には Hash を与...
...シンボル、
* :proxy
* :progress_proc
* :content_length_proc
* :http_basic_authentication
* :proxy_http_basic_authentication
* :read_timeout
* :ssl_ca_cert
* :ssl_verify_mode
* :ftp_active_mode
* :redirect
です。
「:content_length_proc」と「:progress_proc」はプログレスバ...
...('http://www.example.com',
{ :proxy => 'http://proxy.example.com:8000/',
:http_basic_authentication => [username, password] })

: :proxy
プロクシの設定をします。
値には以下のいずれかを与えます。
//emlist{
文字列:...