diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-05-18 08:57:37 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-05-18 08:57:37 +0000 |
commit | 08a0727577e23ee55ce0eb09a78826f7f7642411 (patch) | |
tree | 8b56995afa158a3faea8a5bc8cfed2f97cfbc706 /lib/net/http.rb | |
parent | f63956c52c796194f5a4f5178775d80582e543c1 (diff) |
o protocol.rb, http.rb, smtp.rb, pop.rb: update RD documents
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/http.rb')
-rw-r--r-- | lib/net/http.rb | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index 2a7190f126..402169c511 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -23,18 +23,28 @@ module Net == Class Methods -: new( address, port = 80 ) - create new HTTP object. +: new( address = 'localhost', port = 80 ) + creates a new Net::HTTP object. + +: start( address = 'localhost', port = 80 ) +: start( address = 'localhost', port = 80 ) {|http| .... } + equals to Net::HTTP.new( address, port ).start : port - returns HTTP default port, 80 + HTTP default port, 80 : command_type - returns Command class, HTTPCommand - + Command class for Net::HTTP, HTTPCommand == Methods +: start +: start {|http| .... } + creates a new Net::HTTP object and starts HTTP session. + + When this method is called as iterator, gives HTTP object to block + and close HTTP session after block call finished. + : get( path, header = nil, dest = '' ) : get( path, header = nil ) {|str| .... } get data from "path" on connecting host. |