クラスの継承リスト: URI 要約 URI を扱うためのモジュールです。 目次 特異メソッド decode unescape encode escape extract join parse regexp split 定数 UNSAFE 特異メソッド unescape(str) -> String[permalink][rdoc] decode(str) -> String URI 文字列をデコードした文字列を返します。 例: require 'uri' puts URI.unescape('http://images.google.co.jp/images?q=%A5%E2%A5%CA%A5%EA%A5%B6&ie=EUC-JP') #=> "http://images.google.co.jp/images?q=モナリザ&ie=EUC-JP" [PARAM] str: URI を文字列
[edit] 要約 URI (Uniform Resource Identifier) のためのライブラリです。 関連 RFC 以下は実装の際に参照されている RFC であり、最新の RFC であるとは限りません。 [RFC1738] Uniform Resource Locators (URL) (Updated by [RFC2396]) [RFC2255] The LDAP URL Format (Obsoleted by [RFC4510], [RFC4516]) [RFC2368] The mailto URL scheme [RFC2373] IP Version 6 Addressing Architecture (Obsoleted by [RFC3513]) [RFC2396] Uniform Resource Identifiers (URI): Generic Syn
Instantly convert curl commands to Ruby's net/http Ruby's net/http is notorious for not having the friendliest API, but it isn't all that bad. Ruby has great gems like faraday, but in libraries and small utilities it's better to kill your dependencies and use what the stdlib provides. This tool turns a curl command into ruby (2.0+) code using net/http. Currently, it knows the following options: -d
[edit] 要約 URI を扱うためのモジュールです。 目次 特異メソッド decode_www_form decode_www_form_component encode_www_form encode_www_form_component extract join parse regexp split 定数 UNSAFE 特異メソッド decode_www_form(str, enc=Encoding::UTF_8) -> [[String, String]][permalink][rdoc][edit] 文字列から URL-encoded form data をデコードします。 application/x-www-form-urlencoded 形式のデータをデコードし、 [key, value] という形の配列の配列を返します。 enc で指定したエンコーディングの文字列が UR
module URI URI is a module providing classes to handle Uniform Resource Identifiers (RFC2396) Features¶ ↑ Uniform handling of handling URIs Flexibility to introduce custom URI schemes Flexibility to have an alternate URI::Parser (or just different patterns and regexp's) Basic example¶ ↑ require 'uri' uri = URI("http://foo.com/posts?id=30&limit=5#time=1305298413") #=> #<URI::HTTP:0x00000000b14880 U
■ [ruby] open-uriでUTF-8でないページを取得するときの注意 Ruby標準添付のopen-uriライブラリを使うと、HTMLを簡単に取得することができる。 irb> require 'open-uri' irb> url = "http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/43008" irb> html = open(url).read このとき、文字コードがUTF-8でないことが分かっているなら、第二引数でエンコーディング名を指定しておいた方が良いだろう。(あ、ここからはRuby 1.9の話です。) irb> html = open(url, "r:euc-jp").read 読んだあとは、String#encodeでUTF-8に変換することができる。 irb> html = open(url,
returns a proxy URI. The proxy URI is obtained from environment variables such as http_proxy, ftp_proxy, no_proxy, etc. If there is no proper proxy, nil is returned. Note that capitalized variables (HTTP_PROXY, FTP_PROXY, NO_PROXY, etc.) are examined too. But http_proxy and HTTP_PROXY is treated specially under CGI environment. It's because HTTP_PROXY may be set by Proxy: header. So HTTP_PROXY is
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く