twisted :: web :: client :: HTTPPageGetter :: Class HTTPPageGetter
[hide private]
[frames] | no frames]

Class HTTPPageGetter

internet.protocol.BaseProtocol --+            
                                 |            
        internet.protocol.Protocol --+        
                                     |        
   protocols.basic._PauseableMixin --+        
                                     |        
          protocols.basic.LineReceiver --+    
                                         |    
                           http.HTTPClient --+
                                             |
                                            HTTPPageGetter
Known Subclasses:

hash(x)

Instance Methods [hide private]
 
connectionMade(self)
Called when a connection is made.
 
handleHeader(self, key, value)
Called every time a header is received.
 
handleStatus(self, version, status, message)
Called when the status-line is received.
 
handleEndHeaders(self)
Called when all headers have been received.
 
handleStatus_200(self)
 
handleStatus_201(self)
 
handleStatus_202(self)
 
handleStatusDefault(self)
 
handleStatus_301(self)
 
handleStatus_302(self)
 
handleStatus_303(self)
 
connectionLost(self, reason)
Called when the connection is shut down.
 
handleResponse(self, response)
 
timeout(self)

Inherited from http.HTTPClient: endHeaders, handleResponseEnd, handleResponsePart, lineReceived, rawDataReceived, sendCommand, sendHeader

Inherited from protocols.basic.LineReceiver: clearLineBuffer, dataReceived, lineLengthExceeded, sendLine, setLineMode, setRawMode

Inherited from internet.protocol.BaseProtocol: __providedBy__, makeConnection

Inherited from protocols.basic._PauseableMixin: pauseProducing, resumeProducing, stopProducing

Class Variables [hide private]
  quietLoss = 0
hash(x)
  followRedirect = 1
hash(x)
  failed = 0
hash(x)
  _specialHeaders = set(['content-length', 'cookie', 'host', 'us...

Inherited from http.HTTPClient: firstLine, length

Inherited from protocols.basic.LineReceiver: MAX_LENGTH, delimiter, line_mode

Inherited from internet.protocol.Protocol: __implemented__, __provides__

Inherited from internet.protocol.BaseProtocol: connected, transport

Inherited from protocols.basic._PauseableMixin: paused

Method Details [hide private]

connectionMade(self)

 

Called when a connection is made.

This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.

Overrides: internet.protocol.BaseProtocol.connectionMade
(inherited documentation)

handleHeader(self, key, value)

 

Called every time a header is received.

Overrides: http.HTTPClient.handleHeader
(inherited documentation)

handleStatus(self, version, status, message)

 

Called when the status-line is received.

Parameters:
  • version - e.g. 'HTTP/1.0'
  • status - e.g. '200'
  • message - e.g. 'OK'
Overrides: http.HTTPClient.handleStatus
(inherited documentation)

handleEndHeaders(self)

 

Called when all headers have been received.

Overrides: http.HTTPClient.handleEndHeaders
(inherited documentation)

connectionLost(self, reason)

 

Called when the connection is shut down.

Clear any circular references here, and any external references to this Protocol. The connection has been closed.

Overrides: internet.protocol.Protocol.connectionLost
(inherited documentation)

Class Variable Details [hide private]

_specialHeaders

Value:
set(['content-length', 'cookie', 'host', 'user-agent'])