From 08a0727577e23ee55ce0eb09a78826f7f7642411 Mon Sep 17 00:00:00 2001 From: aamine Date: Thu, 18 May 2000 08:57:37 +0000 Subject: 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 --- lib/net/http.rb | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'lib/net/http.rb') 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. -- cgit v1.2.3