Source code for aliyun.log.logresponse
#!/usr/bin/env python
#encoding: utf-8
# Copyright (C) Alibaba Cloud Computing
# All rights reserved.
[docs]class LogResponse:
""" The base response class of all log response.
:type headers: dict
:param headers: HTTP response header
"""
def __init__(self, headers):
self.headers = headers
[docs] def get_request_id(self):
""" Get the request id of the response. '' will be return if not set.
:return: string, request id
"""
return self.headers['x-log-requestid'] if 'x-log-requestid' in self.headers else ''
[docs] def log_print(self):
print 'header: ', self.headers