Request¶
An abstract request
- class Request.Request¶
Bases:
object
The abstract request class.
Request is a base class that offers the following:
A time stamp (indicating when the request was made)
An input stream
Remote request information (address, name)
Local host information (address, name, port)
A security indicator
Request is an abstract class; developers typically use HTTPRequest.
- __init__()¶
Initialize the request.
Subclasses are responsible for invoking super and initializing self._time.
- clearTransaction()¶
- input()¶
Return a file-style object that the contents can be read from.
- isSecure()¶
Check whether this is a secure channel.
Returns true if request was made using a secure channel, such as HTTPS. This currently always returns false, since secure channels are not yet supported.
- localAddress()¶
Get local address.
Returns a string containing the Internet Protocol (IP) address of the local host (e.g., the server) that received the request.
- static localName()¶
Get local name.
Returns the fully qualified name of the local host (e.g., the server) that received the request.
- localPort()¶
Get local port.
Returns the port of the local host (e.g., the server) that received the request.
- remoteAddress()¶
Get the remote address.
Returns a string containing the Internet Protocol (IP) address of the client that sent the request.
- remoteName()¶
Get the remote name.
Returns the fully qualified name of the client that sent the request, or the IP address of the client if the name cannot be determined.
- responseClass()¶
Get the corresponding response class.
- setTransaction(trans)¶
Set a transaction container.
- time()¶
- timeStamp()¶
Return time() as human readable string for logging and debugging.
- transaction()¶
Get the transaction container.
- writeExceptionReport(handler)¶