twisted :: web :: server :: Request :: Class Request
[hide private]

Class Request

 spread.jelly.Jellyable --+        
                          |        
spread.flavors.Serializable --+    
                              |    
        spread.flavors.Copyable --+
                                  |
                   http.Request --+
                                  |
 persisted.styles.Versioned --+   |
                              |   |
python.components.Componentized --+
                                  |
                                 Request
Known Subclasses:

An HTTP request.

Instance Methods [hide private]
 
URLPath(self)
 
__init__(self, *args, **kw)
 
__provides__(...)
Special descriptor for class __provides__
 
_prePathURL(self, prepath)
 
childLink(self, name)
Return the text that links to a child of the requested resource.
 
getRootURL(self)
Get a previously-remembered URL.
 
getSession(self, sessionInterface=None)
 
getStateToCopyFor(self, issuer)
Gather state to send when I am serialized for a particular perspective.
 
prePathURL(self)
 
process(self)
Process a request.
 
processingFailed(self, reason)
 
rememberRootURL(self)
Remember the currently-processed part of the URL for later recalling.
 
render(self, resrc)
Ask a resource to render itself.
 
sibLink(self, name)
Return the text that links to a sibling of the requested resource.
 
view_addCookie(self, issuer, k, v, **kwargs)
Remote version of addCookie; same interface.
 
view_finish(self, issuer)
Remote version of finish; same interface.
 
view_registerProducer(self, issuer, producer, streaming)
Remote version of registerProducer; same interface.
 
view_setETag(self, issuer, tag)
Remote version of setETag; same interface.
 
view_setHeader(self, issuer, k, v)
Remote version of setHeader; same interface.
 
view_setLastModified(self, issuer, when)
Remote version of setLastModified; same interface.
 
view_setResponseCode(self, issuer, code, message=None)
Remote version of setResponseCode; same interface.
 
view_unregisterProducer(self, issuer)
 
view_write(self, issuer, data)
Remote version of write; same interface.
 
write(self, data)
Write data to the transport (if not responding to a HEAD request).

Inherited from spread.flavors.Copyable: getStateToCopy, getTypeToCopy, getTypeToCopyFor, jellyFor

Inherited from spread.flavors.Serializable: processUniqueID

Inherited from spread.jelly.Jellyable: __providedBy__, getStateFor

Inherited from http.Request: __repr__, __setattr__, addCookie, connectionLost, finish, getAllHeaders, getClient, getClientIP, getCookie, getHeader, getHost, getPassword, getRequestHostname, getUser, gotLength, handleContentChunk, isSecure, noLongerQueued, notifyFinish, parseCookies, redirect, registerProducer, requestReceived, setETag, setHeader, setHost, setLastModified, setResponseCode, unregisterProducer

Inherited from http.Request (private): _authorize, _cleanup, _sendError

Inherited from python.components.Componentized: __conform__, addAdapter, addComponent, getComponent, locateAdapterClass, removeComponent, setAdapter, setComponent, unsetComponent

Inherited from persisted.styles.Versioned: __getstate__, __setstate__, versionUpgrade

Class Variables [hide private]
  __implemented__ = <implementedBy twisted.web.server.Request>
  __pychecker__ = 'unusednames=issuer'
  _inFakeHead = False
  appRootURL = None
hash(x)
  session = None
hash(x)
  site = None
hash(x)

Inherited from http.Request: chunked, clientproto, code, code_message, content, etag, finished, lastModified, producer, sentLength, startedWriting

Inherited from http.Request (private): _forceSSL

Inherited from python.components.Componentized: persistenceVersion

Inherited from persisted.styles.Versioned: persistenceForgets

Instance Variables [hide private]
  defaultContentType = 'text/html'
A str giving the default Content-Type value to send in responses if no other value is set.

Inherited from http.Request: args, headers, method, notifications, path, received_headers, requestHeaders, responseHeaders, uri

Inherited from http.Request (private): _disconnected

Method Details [hide private]

__init__(self, *args, **kw)
(Constructor)

 
Parameters:
  • channel - the channel we're connected to.
  • queued - are we in the request queue, or can we start writing to the transport?
Overrides: python.components.Componentized.__init__

__provides__(...)

 
Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that
we can get declarations for objects without instance-specific
interfaces a bit quicker.

Overrides: persisted.styles.Versioned.__provides__

getStateToCopyFor(self, issuer)

 

Gather state to send when I am serialized for a particular perspective.

I will default to calling getStateToCopy. Override this to customize this behavior.

Overrides: spread.flavors.Copyable.getStateToCopyFor
(inherited documentation)

process(self)

 

Process a request.

Overrides: http.Request.process

render(self, resrc)

 

Ask a resource to render itself.

Parameters:
  • resrc - a twisted.web.resource.IResource.

view_registerProducer(self, issuer, producer, streaming)

 

Remote version of registerProducer; same interface. (requires a remote producer.)

write(self, data)

 

Write data to the transport (if not responding to a HEAD request).

Parameters:
  • data - A string to write to the response.
Overrides: http.Request.write

Instance Variable Details [hide private]

defaultContentType

A str giving the default Content-Type value to send in responses if no other value is set. None disables the default.
Value:
'text/html'