From 83d5f9e60aebbc3ebe92bd060deccf1693e3f7a9 Mon Sep 17 00:00:00 2001 From: Paul Kuruvilla Date: Sun, 21 Jan 2018 18:48:10 +0530 Subject: [PATCH] Fix documentation for HTTP connection reuse --- lib/net/http.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/net/http.rb b/lib/net/http.rb index c2d33018a235..2d575aeeccb2 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -104,14 +104,13 @@ class HTTPHeaderSyntaxError < StandardError; end # open for multiple requests in the block if the server indicates it # supports persistent connections. # + # If you wish to re-use a connection across multiple HTTP requests without + # automatically closing it you can use ::new and then call #start and + # #finish manually. + # # The request types Net::HTTP supports are listed below in the section "HTTP # Request Classes". # - # If you wish to re-use a connection across multiple HTTP requests without - # automatically closing it you can use ::new instead of ::start. #request - # will automatically open a connection to the server if one is not currently - # open. You can manually close the connection with #finish. - # # For all the Net::HTTP request objects and shortcut request methods you may # supply either a String for the request path or a URI from which Net::HTTP # will extract the request path.