るりまサーチ (Ruby 2.1.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.032秒)
トップページ > バージョン:2.1.0[x] > クエリ:String[x] > クエリ:content[x] > ライブラリ:net/http[x] > クエリ:get_fields[x]

別のキーワード

  1. rss content=
  2. rss content
  3. net/imap content_id
  4. item content=
  5. items content

モジュール

検索結果

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
//}

一種類のヘ...