るりまサーチ (Ruby 2.7.0)

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

別のキーワード

  1. net/http get
  2. net/http start
  3. http get
  4. http start
  5. net/http set_range

モジュール

検索結果

Net::HTTPHeader#sub_type -> String|nil (78364.0)

"text/html" における "html" のようなサブタイプを表す 文字列を返します。

...タイプを表す
文字列を返します。

Content-Type: ヘッダフィールドが存在しない場合には nil を返します。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.sub_type # => "html"
//}...