るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.015秒)
トップページ > クエリ:http[x] > バージョン:2.3.0[x] > ライブラリ:cgi/util[x]

別のキーワード

  1. net/http get
  2. http get
  3. http start
  4. net/http start
  5. net/http post

クラス

キーワード

検索結果

CGI.escape(string) -> String (79.0)

与えられた文字列を URL エンコードした文字列を新しく作成し返します。

与えられた文字列を URL エンコードした文字列を新しく作成し返します。

@param string URL エンコードしたい文字列を指定します。

例:
require "cgi"

p CGI.escape('@##') #=> "%40%23%23"

url = "http://www.example.com/register?url=" +
CGI.escape('http://www.example.com/index.rss')
p url
#=> "http://www...

CGI.unescape(string) -> String (43.0)

与えられた文字列を URL デコードした文字列を新しく作成し返します。

与えられた文字列を URL デコードした文字列を新しく作成し返します。

@param string URL エンコードされている文字列を指定します。

require "cgi"

p CGI.unescape('%40%23%23') #=> "@##"

p CGI.unescape("http%3A%2F%2Fwww.example.com%2Findex.rss")
#=> "http://www.example.com/index.rss"