2件ヒット
[1-2件を表示]
(0.032秒)
モジュール
-
Net
:: HTTPHeader (2)
検索結果
-
Net
:: HTTPHeader # get _ fields(key) -> [String] (54649.0) -
key ヘッダフィールドの値 (文字列) を配列で返します。
...y は大文字小文字を区別しません。
@param key ヘッダフィール名を文字列で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.get_fields('accept-ranges') # => ["none"]
//}
@see... -
Net
:: HTTPHeader # [](key) -> String|nil (346.0) -
key ヘッダフィールドを返します。
...しては '2048'
のような文字列が得られます。キーが存在しなければ nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req['user-agent'] # => Ruby
//}
一種類のヘ...