84件ヒット
[1-84件を表示]
(0.096秒)
種類
- インスタンスメソッド (60)
- ライブラリ (12)
- 特異メソッド (12)
クラス
検索結果
先頭5件
-
RSS
:: Rss :: Channel :: Item :: Enclosure # url= (21101.0) -
@todo
...@todo... -
RSS
:: Maker :: RSS20 :: Items :: Item :: Enclosure # url=() (21100.0) -
@todo
...@todo... -
RSS
:: Maker :: RSS20 :: Items :: Item :: Source # url=() (21100.0) -
@todo
...@todo... -
RSS
:: Rss :: Channel :: Item :: Source # url= (18101.0) -
@todo
...@todo... -
net
/ http (6018.0) -
汎用データ転送プロトコル HTTP を扱うライブラリです。 実装は 2616 に基きます。
...ル HTTP を扱うライブラリです。
実装は 2616 に基きます。
=== 使用例
==== ウェブサーバからドキュメントを得る (GET)
//emlist[例1: GET して 表示するだけ][ruby]{
require 'net/http'
print Net::HTTP.get('www.example.com', '/index.html')
//}
//emlist[例......et/http'
require 'uri'
print Net::HTTP.get(URI.parse('http://www.example.com/index.html'))
//}
//emlist[例3: より汎用的な例][ruby]{
require 'net/http'
require 'uri'
url = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.start(url.host, url.port) {|http|
http.get('/index.htm......l')
}
puts res.body
//}
//emlist[例4: 上の例よりさらに汎用的な例][ruby]{
require 'net/http'
url = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(url.path)
res = Net::HTTP.start(url.host, url.port) {|http|
http.request(req)
}
puts res.body
//}
==== フォ... -
RSS
:: Rss :: Channel :: Item :: Source # url (3001.0) -
@todo
...@todo... -
CGI
. escape(string) -> String (212.0) -
与えられた文字列を 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.......example.com/register?url=http%3A%2F%2Fwww.example.com%2Findex.rss"...