るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.062秒)
トップページ > バージョン:2.6.0[x] > クエリ:String[x] > クエリ:get[x] > クエリ:code[x]

別のキーワード

  1. string []=
  2. string slice
  3. string slice!
  4. string []
  5. string gsub

ライブラリ

クラス

モジュール

検索結果

Net::HTTPResponse#code -> String (54643.0)

HTTP のリザルトコードです。例えば '302' などです。

HTTP のリザルトコードです。例えば '302' などです。

この値を見ることでレスポンスの種類を判別できますが、
レスポンスオブジェクトがどのクラスのインスタンスかを
見ることでもレスポンスの種類を判別できます。

//emlist[例][ruby]{
require 'net/http'

uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.code # => "200"
//}

CGI::HtmlExtension#form(method = "post", action = nil, enctype = "application/x-www-form-urlencoded") -> String (817.0)

form 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。

form 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。

@param method method 属性の値として "get" か "post" を指定します。

@param action action 属性の値を指定します。デフォルトは現在の CGI スクリプト名です。

@param enctype enctype 属性の値を指定します。デフォルトは "application/x-www-form-urlencoded" です。

例:
form{ "string" }
# <FORM METHOD="post" ENCTYPE="app...

CGI::HtmlExtension#form(method = "post", action = nil, enctype = "application/x-www-form-urlencoded") { ... } -> String (817.0)

form 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。

form 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。

@param method method 属性の値として "get" か "post" を指定します。

@param action action 属性の値を指定します。デフォルトは現在の CGI スクリプト名です。

@param enctype enctype 属性の値を指定します。デフォルトは "application/x-www-form-urlencoded" です。

例:
form{ "string" }
# <FORM METHOD="post" ENCTYPE="app...