8件ヒット
[1-8件を表示]
(0.178秒)
ライブラリ
-
cgi
/ core (1) -
net
/ http (3) - open-uri (1)
-
webrick
/ httprequest (1) -
webrick
/ httpresponse (2)
クラス
モジュール
-
CGI
:: QueryExtension (1) -
Net
:: HTTPHeader (3) -
OpenURI
:: Meta (1)
キーワード
-
content
_ type= (2) -
set
_ content _ type (1)
検索結果
先頭5件
-
OpenURI
:: Meta # content _ type -> String (99925.0) -
対象となるリソースの Content-Type を文字列で返します。Content-Type ヘッダの情報が使われます。 Content-Type ヘッダがない場合は、"application/octet-stream" を返します。
対象となるリソースの Content-Type を文字列で返します。Content-Type ヘッダの情報が使われます。
Content-Type ヘッダがない場合は、"application/octet-stream" を返します。
//emlist[例][ruby]{
require 'open-uri'
open('http://www.ruby-lang.org/') {|f|
p f.content_type #=> "text/html"
}
//} -
Net
:: HTTPHeader # content _ type -> String|nil (90961.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... -
CGI
:: QueryExtension # content _ type -> String (90955.0) -
ENV['CONTENT_TYPE'] を返します。
ENV['CONTENT_TYPE'] を返します。 -
WEBrick
:: HTTPRequest # content _ type -> String | nil (90907.0) -
リクエストの Content-Type ヘッダを文字列で返します。
リクエストの Content-Type ヘッダを文字列で返します。 -
WEBrick
:: HTTPResponse # content _ type -> String | nil (90907.0) -
Content-Type ヘッダの値を返します。
Content-Type ヘッダの値を返します。 -
Net
:: HTTPHeader # content _ type=(type) (55264.0) -
type と params から Content-Type: ヘッダフィールドの 値を設定します。
type と params から Content-Type: ヘッダフィールドの
値を設定します。
@param type メディアタイプを文字列で指定します。
@param params パラメータ属性をハッシュで指定します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_type # => ni... -
Net
:: HTTPHeader # set _ content _ type(type , params = {}) (55264.0) -
type と params から Content-Type: ヘッダフィールドの 値を設定します。
type と params から Content-Type: ヘッダフィールドの
値を設定します。
@param type メディアタイプを文字列で指定します。
@param params パラメータ属性をハッシュで指定します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_type # => ni... -
WEBrick
:: HTTPResponse # content _ type=(val) (54925.0) -
Content-Type ヘッダの値をセットします。
Content-Type ヘッダの値をセットします。
@param val Content-Type ヘッダの値を文字列で指定します。
res.content_type = "text/html"
@see WEBrick::HTTPUtils.#mime_type