るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.144秒)
トップページ > バージョン:2.5.0[x] > クエリ:String[x] > クエリ:comment[x] > クエリ:content_type[x]

別のキーワード

  1. comment new
  2. rexml comment
  3. comment node_type
  4. comment clone
  5. comment to_s

ライブラリ

モジュール

検索結果

Net::HTTPHeader#content_type -> String|nil (54679.0)

"text/html" のような Content-Type を表す 文字列を返します。

"text/html" のような Content-Type を表す
文字列を返します。

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

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

uri = URI.parse('http://www.example.com/comments.cgi?post=comment')
req = Net::HTTP::Post.new(uri.request_uri)
req.content_type # => nil
req.content_type = 'multipart/for...