Skip to content

Commit

Permalink
Documenting requirements for a custom HTTP object in Connection.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes committed Feb 12, 2015
1 parent 6dd2caf commit 5921313
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions gcloud/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ class Connection(object):
Subclasses may seek to use the private key from ``credentials`` to sign
data.
A custom (non-``httplib2``) HTTP object must have a ``request`` method
which accepts the following arguments:
* ``uri``
* ``method``
* ``body``
* ``headers``
In addition, ``redirections`` and ``connection_type`` may be used.
Without the use of ``credentials.authorize(http)``, a custom ``http``
object will also need to be able to add a bearer token to API
requests and handle token refresh on 401 errors.
:type credentials: :class:`oauth2client.client.OAuth2Credentials` or
:class:`NoneType`
:param credentials: The OAuth2 Credentials to use for this connection.
Expand Down

0 comments on commit 5921313

Please sign in to comment.