154件ヒット
[1-100件を表示]
(0.063秒)
クラス
モジュール
-
Net
:: HTTPHeader (132)
キーワード
- [] (11)
-
body
_ stream (11) -
body
_ stream= (11) -
content
_ length (11) -
content
_ length= (11) -
content
_ range (11) - delete (11)
- fetch (33)
-
get
_ fields (11) -
range
_ length (11) - size (11)
検索結果
先頭5件
-
Net
:: HTTPHeader # length -> Integer (21104.0) -
このメソッドは obsolete です。
このメソッドは obsolete です。
ヘッダフィールドの数を返します。 -
Net
:: HTTPHeader # content _ length=(len) (9144.0) -
Content-Length: ヘッダフィールドに値を設定します。
...Content-Length: ヘッダフィールドに値を設定します。
len に nil を与えると Content-Length: ヘッダフィールドを
削除します。
@param len 設定する値を整数で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/ind......ex.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_length # => nil
req.content_length = 10 # => 10
req.content_length # => 10
//}... -
Net
:: HTTPHeader # content _ length -> Integer|nil (9138.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)
req.content_length # => nil
req.content_length = 10
req.content_length # => 10
//}... -
Net
:: HTTPHeader # range _ length -> Integer|nil (9110.0) -
Content-Range: ヘッダフィールドの表している長さを整数で返します。
...::HTTPHeaderSyntaxError Content-Range: ヘッダフィールド
の値が不正である場合に
発生します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.co......m/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req['Content-Range'] = "bytes 1-500/1000"
req.range_length # => 500
//}... -
Net
:: HTTPHeader # size -> Integer (6004.0) -
このメソッドは obsolete です。
このメソッドは obsolete です。
ヘッダフィールドの数を返します。 -
Net
:: HTTPHeader # fetch(key) -> String (3033.0) -
key ヘッダフィールドを返します。
...key ヘッダフィールドを返します。
たとえばキー 'content-length' に対しては '2048'
のような文字列が得られます。キーが存在しなければ nil を返します。
該当するキーが登録されてい
ない時には、引数 default が与えられてい......それを全て ", " で連結した文字列を返します。
key は大文字小文字を区別しません。
@param key ヘッダフィール名を文字列で与えます。
@param default 該当するキーが登録されていない時の返り値を指定します。
@raise IndexError 引......][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("user-agent") # => "Ruby"
//}
//emlist[例 key のみ指定。key が存在しない][ruby]{
require 'net/http'
begin
req.fetch("content-length")
rescue => e
e... -
Net
:: HTTPHeader # fetch(key) {|hash| . . . . } -> String (3033.0) -
key ヘッダフィールドを返します。
...key ヘッダフィールドを返します。
たとえばキー 'content-length' に対しては '2048'
のような文字列が得られます。キーが存在しなければ nil を返します。
該当するキーが登録されてい
ない時には、引数 default が与えられてい......それを全て ", " で連結した文字列を返します。
key は大文字小文字を区別しません。
@param key ヘッダフィール名を文字列で与えます。
@param default 該当するキーが登録されていない時の返り値を指定します。
@raise IndexError 引......][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("user-agent") # => "Ruby"
//}
//emlist[例 key のみ指定。key が存在しない][ruby]{
require 'net/http'
begin
req.fetch("content-length")
rescue => e
e... -
Net
:: HTTPHeader # fetch(key , default) -> String (3033.0) -
key ヘッダフィールドを返します。
...key ヘッダフィールドを返します。
たとえばキー 'content-length' に対しては '2048'
のような文字列が得られます。キーが存在しなければ nil を返します。
該当するキーが登録されてい
ない時には、引数 default が与えられてい......それを全て ", " で連結した文字列を返します。
key は大文字小文字を区別しません。
@param key ヘッダフィール名を文字列で与えます。
@param default 該当するキーが登録されていない時の返り値を指定します。
@raise IndexError 引......][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.fetch("user-agent") # => "Ruby"
//}
//emlist[例 key のみ指定。key が存在しない][ruby]{
require 'net/http'
begin
req.fetch("content-length")
rescue => e
e... -
Net
:: HTTPHeader # delete(key) -> [String] | nil (3027.0) -
key ヘッダフィールドを削除します。
...。
@param key 削除するフィールド名
@return 取り除かれたフィールドの値を返します。
key ヘッダフィールドが存在しなかった場合には
nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/i......ndex.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
//}... -
Net
:: HTTPHeader # content _ range -> Range|nil (3019.0) -
Content-Range: ヘッダフィールドの値を Range で返します。 Range の表わす長さは Net::HTTPHeader#range_length で得られます。
...Range の表わす長さは Net::HTTPHeader#range_length で得られます。
ヘッダが設定されていない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.conten...