fog/fog — pull request #1142 by grkvlt (2012-09-11 22:52:19+00:00)
Title: Add Accept header with application/json media type to OpenStack requests

The Fog code expects JSON data to be returned, and in some cases enforces this by appending `.json` to the URI. However, this is not employed consistently. Since the OpenStack specification does not require JSON to be the default media type many calls will fail if connecting to an implementation that returns XML or even some other media as a default.

I have added an Accept header to the requests for compute, identity and volume services, set to `application/json`. This has been tested on an OpenStack implementation configured to default to XML representations.