るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
6件ヒット [1-6件を表示] (0.012秒)
トップページ > ライブラリ:uri[x] > バージョン:2.5.0[x] > クエリ:HTTPS[x]

別のキーワード

  1. webrick/https http
  2. webrick/https parse
  3. webrick/https cipher
  4. webrick/https server_cert
  5. webrick/https client_cert

種類

クラス

モジュール

検索結果

URI::HTTPS (54055.0)

HTTPS URI を表すクラスです。

...HTTPS URI を表すクラスです。...

URI.decode_www_form(str, enc=Encoding::UTF_8) -> [[String, String]] (25.0)

文字列から URL-encoded form data をデコードします。

...されています。
そのため「&」区切りのみに対応していて、「;」区切りには対応していません。

require 'uri'
ary = URI.decode_www_form("a=1&a=2&b=3")
p ary #=> [['a', '1'], ['a', '2'], ['b', '3']]
p ary.assoc('a').last #=> '1'
p ary.ass...
...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 (25.0)

URL-encoded form data の文字列の各コンポーネント をデコードした文字列を返します。

...URL-encoded form data の文字列の各コンポーネント
をデコードした文字列を返します。

通常は URI.decode_www_form を使うほうがよいでしょう。

"+" という文字は空白文字にデコードします。

enc で指定したエンコーディングの文字...
...れています。


//emlist[][ruby]{
require 'uri'
enc = 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%AB"
p URI.decode_www_form_component(enc)
# => "Ruby リファ...
...レンスマニュアル"
//}

@param str デコード対象の文字列
@param enc エンコーディング
@raise ArgumentError str のフォーマットが不正である場合に発生します
@see URI.encode_www_form_component, URI.decode_www_form...

URI.encode_www_form(enum, enc=nil) -> String (25.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...
...い場合は multipart/form-data をつかうべきで
このメソッドを使うべきではありません。

このメソッドは内部的に
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 (25.0)

文字列を URL-encoded form data の1コンポーネント としてエンコードした文字列を返します。

...文字列を URL-encoded form data の1コンポーネント
としてエンコードした文字列を返します。

通常は URI.encode_www_form を使うほうがよいでしょう。

このメソッドでは *, -, ., 0-9, A-Z, _, a-z, は変換せず、
空白は + に変換し、その他...
.../www.w3.org/TR/2013/CR-html5-20130806/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%E...
...3%83%8B%E3%83%A5%E3%82%A2%E3%83%AB"
//}

@param str エンコードする文字列
@param enc 指定された場合、パーセントエンコーディングする前に、strをこのエンコーディングに変換
@see URI.decode_www_form_component, URI.encode_www_form...

絞り込み条件を変える

URI::Generic.default_port -> Integer | nil (25.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...