Project

General

Profile

Actions

Feature #4100

closed

Improve Net::HTTP documentation

Added by drbrain (Eric Hodel) over 13 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:33469]

Description

=begin
The attached patch reorganizes and further explains how to use Net::HTTP.

The patch emphasizes using the persistent connection APIs over the simpler but more convenient non-persistent APIs.

The documentation now starts with an example using start/request, continues to describing how to extract data from a response, follow redirects and make POSTs which should be the most common operations.

Following that is examples for setting headers, basic authentication, streaming response bodies, HTTPS and proxies.

HTTPS documentation was moved from net/https.rb to the appropriate locations in Net::HTTP.

The final examples are for the Net::HTTP class methods ::get, ::get_response and ::post_form as they do not maintain persistent connections.

The HTTP request and response class sections have been modified to use rdoc lists.

The patch is on top of Mike Perham's patch in #4093 but moves the username/password Net::HTTP::Proxy example to the Net::HTTP::Proxy method.
=end


Files

net.http.rb.doc.patch (28.7 KB) net.http.rb.doc.patch drbrain (Eric Hodel), 11/30/2010 05:36 AM
net-http-2010.patch (35.7 KB) net-http-2010.patch Patches against 1.9 HEAD to improve net/http documentation meta (mathew murphy), 11/30/2010 08:26 AM
net.http.rb.doc.2.patch (25.3 KB) net.http.rb.doc.2.patch Revised patch that applies atop 29983 drbrain (Eric Hodel), 12/01/2010 02:06 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0