summaryrefslogtreecommitdiffstats
path: root/lib/net/http.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net/http.rb')
-rw-r--r--lib/net/http.rb20
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb
index 2a7190f12..402169c51 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.