66件ヒット
[1-66件を表示]
(0.017秒)
別のキーワード
クラス
-
URI
:: Generic (11)
モジュール
- URI (44)
キーワード
-
decode
_ www _ form (11) -
decode
_ www _ form _ component (11) -
default
_ port (11) -
encode
_ www _ form (11) -
encode
_ www _ form _ component (11)
検索結果
先頭5件
-
URI
:: HTTPS (18018.0) -
HTTPS URI を表すクラスです。
...HTTPS URI を表すクラスです。... -
URI
. decode _ www _ form(str , enc=Encoding :: UTF _ 8) -> [[String , String]] (8.0) -
文字列から URL-encoded form data をデコードします。
...す。
このメソッドは
https://url.spec.whatwg.org/#concept-urlencoded-parser
にもとづいて実装されています。
そのため「&」区切りのみに対応していて、「;」区切りには対応していません。
require 'uri'
ary = URI.decode_www_form("a=1&a=2&b=3")......assoc('a').last #=> '2'
p Hash[ary] # => {"a"=>"2", "b"=>"3"}
@param str デコード対象の文字列
@param enc エンコーディング
@raise ArgumentError str のフォーマットが不正である場合に発生します
@see URI.decode_www_form_component, URI.encode_www_form... -
URI
. decode _ www _ form _ component(str , enc=Encoding :: UTF _ 8) -> String (8.0) -
URL-encoded form data の文字列の各コンポーネント をデコードした文字列を返します。
...URL-encoded form data の文字列の各コンポーネント
をデコードした文字列を返します。
通常は URI.decode_www_form を使うほうがよいでしょう。
"+" という文字は空白文字にデコードします。
enc で指定したエンコーディングの文字......、エンコーディングを付加します。
このメソッドは
https://www.w3.org/TR/html5/sec-forms.html#urlencoded-form-data
にもとづいて実装されています。
//emlist[][ruby]{
require 'uri'
enc = URI.encode_www_form_component('Ruby リファレンスマニュアル')
# => "......B"
p URI.decode_www_form_component(enc)
# => "Ruby リファレンスマニュアル"
//}
@param str デコード対象の文字列
@param enc エンコーディング
@raise ArgumentError str のフォーマットが不正である場合に発生します
@see URI.encode_www_form_component, URI.de... -
URI
. encode _ www _ form(enum , enc=nil) -> String (8.0) -
enum から URL-encoded form data を生成します。
...uire 'uri'
URI.encode_www_form([["a", "1"], ["b", "2"], ["c", "x yz"]])
# => "a=1&b=2&c=x+yz"
実際には、each のブロック呼び出しで [key, value] の形のデータを渡すものであれば
何でも渡すことができます(例えば Hash など)。
require 'uri'
URI.encod......かうべきで
このメソッドを使うべきではありません。
このメソッドは内部的に
URI.encode_www_form_component
を使っています。
このメソッドは
https://url.spec.whatwg.org/#concept-urlencoded-serializer
にもとづいて実装されています。
@param......enum エンコードするデータ列([key, value] という形のデータの列)
@param enc 指定された場合、パーセントエンコーディングする前に、このエンコーディングに変換
@see URI.encode_www_form_component, URI.decode_www_form... -
URI
. encode _ www _ form _ component(str , enc=nil) -> String (8.0) -
文字列を URL-encoded form data の1コンポーネント としてエンコードした文字列を返します。
...字列を返します。
通常は URI.encode_www_form を使うほうがよいでしょう。
このメソッドでは *, -, ., 0-9, A-Z, _, a-z, は変換せず、
空白は + に変換し、その他は %XX に、変換します。
このメソッドは
https://www.w3.org/TR/2013/CR-html5-2013......0806/forms.html#url-encoded-form-data
にもとづいて実装されています。
//emlist[][ruby]{
require 'uri'
p URI.encode_www_form_component('Ruby リファレンスマニュアル')
# => "Ruby+%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9%E3%83%9E%E3%83%8B%E3%83%A5%E3%82%A2%E3%83%A......B"
//}
@param str エンコードする文字列
@param enc 指定された場合、パーセントエンコーディングする前に、strをこのエンコーディングに変換
@see URI.decode_www_form_component, URI.encode_www_form... -
URI
:: Generic . default _ port -> Integer | nil (8.0) -
スキームに対応するデフォルトのポート番号を整数で返します。
...ます。
require 'uri'
URI::Generic.default_port # => nil
URI::FTP.default_port # => 21
URI::HTTP.default_port # => 80
URI::HTTPS.default_port # => 443
URI::LDAP.default_port # => 389
URI::LDAPS.default_port # => 636
URI::MailTo.default_port...