232件ヒット
[1-100件を表示]
(0.027秒)
種類
- インスタンスメソッド (144)
- ライブラリ (36)
- 文書 (36)
- モジュール関数 (16)
ライブラリ
-
cgi
/ core (12) -
net
/ http (36) - open-uri (64)
-
webrick
/ httprequest (12) -
webrick
/ httpresponse (36)
クラス
-
WEBrick
:: HTTPRequest (12) -
WEBrick
:: HTTPResponse (36)
モジュール
-
CGI
:: QueryExtension (12) - Kernel (16)
-
Net
:: HTTPHeader (36) -
OpenURI
:: Meta (36) -
OpenURI
:: OpenRead (12)
キーワード
- []= (12)
- cgi (12)
- charset (24)
-
content
_ type= (24) - open (16)
- open-uri (12)
- read (12)
-
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 9 feature (12) -
set
_ content _ type (12) -
webrick
/ cgi (12)
検索結果
先頭5件
-
OpenURI
:: Meta # content _ type -> String (24262.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 #=> "tex......スの Content-Type を文字列で返します。Content-Type ヘッダの情報が使われます。
Content-Type ヘッダがない場合は、"application/octet-stream" を返します。
//emlist[例][ruby]{
require 'open-uri'
URI.open('http://www.ruby-lang.org/') {|f|
p f.content_type #=>... -
Net
:: HTTPHeader # content _ type -> String|nil (24260.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"
//}... -
CGI
:: QueryExtension # content _ type -> String (24234.0) -
ENV['CONTENT_TYPE'] を返します。
...ENV['CONTENT_TYPE'] を返します。... -
WEBrick
:: HTTPRequest # content _ type -> String | nil (24218.0) -
リクエストの Content-Type ヘッダを文字列で返します。
...リクエストの Content-Type ヘッダを文字列で返します。... -
WEBrick
:: HTTPResponse # content _ type -> String | nil (24218.0) -
Content-Type ヘッダの値を返します。
...Content-Type ヘッダの値を返します。... -
Net
:: HTTPHeader # content _ type=(type) (12256.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 # => nil
req.content_type = 'multipart/form-data' # => "multipart/form-data"
req.content_type # => "multipart/form-data"
//}... -
Net
:: HTTPHeader # set _ content _ type(type , params = {}) (12256.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 # => nil
req.content_type = 'multipart/form-data' # => "multipart/form-data"
req.content_type # => "multipart/form-data"
//}... -
WEBrick
:: HTTPResponse # content _ type=(val) (12236.0) -
Content-Type ヘッダの値をセットします。
...
Content-Type ヘッダの値をセットします。
@param val Content-Type ヘッダの値を文字列で指定します。
res.content_type = "text/html"
@see WEBrick::HTTPUtils.#mime_type... -
cgi (72.0)
-
CGI プログラムの支援ライブラリです。
...local_path # ローカルファイルのパス
value.original_filename # 元の名前
value.content_type # content_type
//}
==== クライアントにクッキーを渡す
//emlist[][ruby]{
require "cgi"
cgi = CGI.new
for name, cookie in cgi.......YPE
* CONTENT_LENGTH
* CONTENT_TYPE
* GATEWAY_INTERFACE
* PATH_INFO
* PATH_TRANSLATED
* QUERY_STRING
* REMOTE_ADDR
* REMOTE_HOST
* REMOTE_IDENT
* REMOTE_USER
* REQUEST_METHOD
* SCRIPT_NAME
* SERVER_NAME
* SERVER_PORT
* SERVER_PROTOCOL
* SERVER_SOFTWARE
#content_lengt......# HTML3.2に準拠したHTML生成メソッドを追加
cgi.h1
# <H1></h1>
cgi.h1{ "content" }
# <H1>content</H1>
cgi.h1({ "class" => "foo", "attr" => "bar" }){ "content" }
# <H1 class="foo" attr="bar">content</H1>
# HTML生成メソッドを追加
CGI.new("html3") # html3.2
CGI.new("html4...