I'm looking to implement a REST client in PHP, and have previously been using a modified version of the CakePHP Webservice Behavior, which is pretty close to what I am looking for, but I'm not building on Cake, so that's off the list.
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:
- HTTP Basic Authentication
- Following redirects
- Backing off and re-requesting of failed requests
I've read through other SO threads 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). This question is the most potentially helpful, but it has the above, plus two self-rolled libraries 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.
That question also links to Guzzle, 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.
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 again, 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.
There are plenty of quality REST server libraries available - why not REST clients? I'm basically looking for something like Tonic, but as a client. Pest (from above) looks well-built, and is closest, but I'm just surprised there isn't something more established.