puppetlabs/puppet — pull request #1040 by cprice-puppet (2012-08-15 16:22:01+00:00)
Title: Refactor/3.x/extract http methods from rest indirector

There were some useful HTTP methods (http_get, http_post, ...,
http_request) in the Puppet::Indirector::REST class. Most noteworthy
is the http_request method, which provides some useful error
handling so that users get less confusing error messages when something
goes wrong with their certificates / SSL setup.

These methods would be useful in several other places (among them: the
HTTP reports processor and several places in the puppetdb termini), but
prior to this pull req it was very difficult (or impossible) to use them
without doing a very confusing dance with unnecessary ruby mixins and
inheritance from classes in the Indirectory hierarchy.

This pull request factors these methods out into the new
Puppet::Network::HTTP::Connection class, and tweaks
Puppet::Network::HttpPool to return instances of this new class.