- main_type -> String|nil[permalink][rdoc][edit]
- 
"text/html" における "text" のようなタイプを表す文字列を返します。 Content-Type: ヘッダフィールドが存在しない場合には nil を返します。 例 require 'net/http' uri = URI.parse('http://www.example.com/index.html') res = Net::HTTP.get_response(uri) res.main_type # => "text"