33件ヒット
[1-33件を表示]
(0.132秒)
ライブラリ
-
net
/ http (33)
キーワード
-
content
_ type (11) -
main
_ type (11) -
sub
_ type (11)
検索結果
先頭3件
-
Net
:: HTTPHeader # main _ type -> String|nil (140.0) -
"text/html" における "text" のようなタイプを表す 文字列を返します。
..."text/html" における "text" のようなタイプを表す
文字列を返します。
Content-Type: ヘッダフィールドが存在しない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_r......esponse(uri)
res.main_type # => "text"
//}... -
Net
:: HTTPHeader # content _ type -> String|nil (118.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/form-data'
req.content_type # => "multipart/form-data"
//}... -
Net
:: HTTPHeader # sub _ type -> String|nil (118.0) -
"text/html" における "html" のようなサブタイプを表す 文字列を返します。
..."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"
//}...