るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.038秒)
トップページ > クエリ:IO[x] > クエリ:request_method[x] > クラス:CGI[x]

別のキーワード

  1. request new
  2. http request_head
  3. http request_get
  4. request verify
  5. http request_put

ライブラリ

検索結果

CGI#out(options = "text/html") { .... } (107.0)

HTTP ヘッダと、ブロックで与えられた文字列を標準出力に出力します。

...リクエスト (REQUEST_METHOD == "HEAD") の場合は HTTP ヘッダのみを出力します。

charset が "iso-2022-jp"・"euc-jp"・"shift_jis" のいずれかで
ある場合は文字列エンコーディングを自動変換し、language を "ja"にします。

@param options Hash か文...
...P ヘッダを生成するための情報を指定します。

例:
cgi
= CGI.new
cgi
.out{ "string" }
# Content-Type: text/html
# Content-Length: 6
#
# string

cgi
.out("text/plain"){ "string" }
# Content-Type: text/plain...
...=> true,
"status" => "OK", # == "200 OK"
"server" => ENV['SERVER_SOFTWARE'],
"connection" => "close",
"type" => "text/html",
"charset" => "iso-2022-jp",
# Content-Type: text/...