Helpers for httplib2.Http module.
build_http
(http=None)[source]¶Set custom Forseti user agent and timeouts on a new http object.
Parameters: | http (object) – An instance of httplib2.Http, or compatible, used for testing. |
---|---|
Returns: | An http object with the forseti user agent set. |
Return type: | httplib2.Http |
set_user_agent
(http, user_agent)[source]¶Set the user-agent on every request.
Parameters: |
|
---|---|
Returns: | A modified instance of http that was passed in. |
Return type: | httplib2.Http |