2件ヒット
[1-2件を表示]
(0.118秒)
検索結果
-
WEBrick
:: HTTPResponse # content _ type=(val) (54622.0) -
Content-Type ヘッダの値をセットします。
Content-Type ヘッダの値をセットします。
@param val Content-Type ヘッダの値を文字列で指定します。
res.content_type = "text/html"
@see WEBrick::HTTPUtils.#mime_type -
Net
:: HTTPHeader # content _ type -> String|nil (322.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...