title: Simple but established/complete REST client for PHP?
body: <p>I'm looking to implement a REST client in PHP, and have previously been using a modified version of the <a href="http://bakery.cakephp.org/articles/markstory/2008/08/26/webservice-behavior" rel="nofollow noreferrer">CakePHP Webservice Behavior</a>, which is pretty close to what I am looking for, but I'm not building on Cake, so that's off the list.</p>
  
  <p>I'm looking for a REST client that allows me to make basic REST requests and get back the headers/body of the request.  Optional, but desired features:</p>
  
  <ul>
  <li>HTTP Basic Authentication</li>
  <li>Following redirects</li>
  <li>Backing off and re-requesting of failed requests</li>
  </ul>
  
  <p>I've read through <a href="https://stackoverflow.com/questions/1453551/rest-user-authentication">other</a> <a href="https://stackoverflow.com/questions/7682865/simple-php-rest-implementation">SO</a> <a href="https://stackoverflow.com/questions/2479285/whats-the-quickest-way-to-write-a-simple-browser-client-to-talk-to-a-rest-serve">threads</a> and have found a bunch of unhelpful answers that mainly consist of "just write it yourself, it's not hard" or "use cURL" (i.e. same as the previous one) or "here's a code snippet that'll do it" (certainly not established or robust).  <a href="https://stackoverflow.com/questions/894268/php-rest-clients">This question</a> is the most potentially helpful, but it has the above, plus two <a href="https://github.com/educoder/pest" rel="nofollow noreferrer">self-rolled</a> <a href="https://github.com/shurikk/rest-client-php" rel="nofollow noreferrer">libraries</a> posted by their authors that are very basic and are missing some of the above features and, while they'd probably do the trick, are hardly as established or maintained as I would like.</p>
  
  <p>That question also links to <a href="https://github.com/guzzle/guzzle" rel="nofollow noreferrer">Guzzle</a>, which has the opposite problem - while robust and well-supported, it appears to be hugely complex, difficult to configure and set up, and way more than I'm looking for.</p>
  
  <p>So: does anyone know of an established REST client for PHP that just does REST requests, is small and focused (I'm thinking one, maybe two PHP files), but is widely used and supported?  I'm not looking for a framework or a revolution in HTTP usage - just a library to do basic REST requests.  I don't want to reinvent the wheel <em>again</em>, and with the thousands (if not millions) of PHP projects that use REST every day, I'm surprised I haven't found something like this.  </p>
  
  <p>There are plenty of quality REST server libraries available - why not REST clients?  I'm basically looking for something like <a href="http://peej.github.com/tonic/" rel="nofollow noreferrer">Tonic</a>, but as a client.  <a href="https://github.com/educoder/pest" rel="nofollow noreferrer">Pest</a> (from above) looks well-built, and is closest, but I'm just surprised there isn't something more established.</p>