controllers.base_controller module¶
- 
class 
controllers.base_controller.BaseController(config=None, client=None, call_back=None)[source]¶ Bases:
objectAll controllers inherit from this base class.
- Attributes:
 - http_client (HttpClient): The HttpClient which a specific controller
 instance will use. By default all the controller objects share the same HttpClient. A user can use his own custom HttpClient as well.
- http_call_back (HttpCallBack): An object which holds call back
 methods to be called before and after the execution of an HttpRequest.
- global_headers (dict): The global headers of the API which are sent with
 every request.
- 
execute_request(request, binary=False, name=None)[source]¶ Executes an HttpRequest.
- Args:
 request (HttpRequest): The HttpRequest to execute. binary (bool): A flag which should be set to True if
a binary response is expected.
- Returns:
 - HttpContext: The HttpContext of the request. It contains,
 both, the request itself and the HttpResponse object.
- 
global_headers= {'user-agent': 'cohesity-python/1.6.7'}¶ 
- 
http_call_back= None¶ 
- 
http_client= <cohesity_management_sdk.http.requests_client.RequestsClient object>¶