silverstripe/sapphire — pull request #1139 by dhensby (2013-01-28 23:50:59+00:00)
Title: RestfulService improvements

From my recent work having to integrate quite a few APIs and some OAuth requests too, I've noticed the RestfulService is in need of some TLC.

Currently response headers are never passed to the response object, only the URL us used for caching (so method or other data that can easily change the responses are ignored) and there is no way to override the current User Agent.

I've added some code to get a full response from the cURL requests so that headers can be plucked out, which is desperately needed for the class to be useful for most modern APIs.