#NEWLINE# def __init__( self , body = None , status = None , reason = None , headers = None ) : #NEWLINE# #INDENT# "Constructor for an HttpResponse object. \n\n    HttpResponse represents the server's response to an HTTP request from\n    the client. The HttpClient.request method returns a httplib.HTTPResponse\n    object and this HttpResponse class is designed to mirror the interface\n    exposed by httplib.HTTPResponse.\n\n    Args:\n      body: A file like object, with a read() method. The body could also\n          be a string, and the constructor will wrap it so that \n          HttpResponse.read(self) will return the full string.\n      status: The HTTP status code as an int. Example: 200, 201, 404.\n      reason: The HTTP status message which follows the code. Example: \n          OK, Created, Not Found\n      headers: A dictionary containing the HTTP headers in the server's \n          response. A common header in the response is Content-Length.\n    " #NEWLINE# if body : #NEWLINE# #INDENT# if hasattr ( body , 'read' ) : #NEWLINE# #INDENT# self . _body = body #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _body = StringIO . StringIO ( body ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . _body = None #NEWLINE# #UNINDENT# if ( status is not None ) : #NEWLINE# #INDENT# self . status = int ( status ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . status = None #NEWLINE# #UNINDENT# self . reason = reason #NEWLINE# self . _headers = ( headers or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } )