るりまサーチ

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

別のキーワード

  1. request new
  2. request to_der
  3. http request_get
  4. http request_post
  5. http request_head

ライブラリ

クラス

モジュール

検索結果

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

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

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

Net::HTTPHeader#content_length -> Integer|nil (24325.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
//}...

Net::HTTPHeader#delete(key) -> [String] | nil (6224.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
//}...