るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.183秒)
トップページ > クエリ:t[x] > クエリ:Ruby[x] > 種類:インスタンスメソッド[x] > クエリ:r[x] > クエリ:ruby[x] > クエリ:header[x] > クエリ:post[x] > モジュール:Net::HTTPHeader[x]

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

検索結果

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

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

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

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

//emlist[例][ruby]{
r
equire 'net/http'

uri = URI.parse('http://www.example.com/comments.cgi?post=comment')
r
eq = Net::HTTP::Post...
....new(uri.request_uri)
r
eq.content_type # => nil
r
eq.content_type = 'multipart/form-data'
r
eq.content_type # => "multipart/form-data"
//}...