twisted.web._newclient.Request class documentationtwisted.web._newclient
(View In Hierarchy)
Implements interfaces: twisted.web.iweb.IClientRequest
A Request
instance describes an HTTP request to be sent to an HTTP server.
| Instance Variable | method | See __init__. | 
| Instance Variable | uri | See __init__. | 
| Instance Variable | headers | See __init__. | 
| Instance Variable | bodyProducer | See __init__. | 
| Instance Variable | persistent | See __init__. | 
| Method | __init__ | |
| Method | absoluteURI | The absolute URI of the request as bytes, orNoneif the absolute URI cannot be determined. | 
| Method | writeTo | Format this Requestas an 
HTTP/1.1 request and write it to the given transport.  If bodyProducer is 
not None, it will be associated with anIConsumer. | 
| Method | stopWriting | No summary | 
| Instance Variable | _parsedURI | Parsed URI for the request, or None. (type:twisted.web.client.URIorNone) | 
| Class Method | _construct | Private constructor. | 
| Method | _writeHeaders | Undocumented | 
| Method | _writeToBodyProducerChunked | Write this request to the given transport using chunked transfer-encoding to frame the body. | 
| Method | _writeToBodyProducerContentLength | Write this request to the given transport using content-length to frame the body. | 
| Method | _writeToEmptyBodyContentLength | Write this request to the given transport using content-length to frame the (empty) body. | 
| Parameters | method | The HTTP method for this request, ex: b'GET', b'HEAD', b'POST', etc. (type: bytes) | 
| uri | The relative URI of the resource to request.  For example, b'/foo/bar?baz=quux'. (type:bytes) | |
| headers | Headers to be sent to the server.  It is important to note that this object
does not create any implicit headers.  So it is up to the HTTP Client to 
add required headers such as 'Host'. (type: twisted.web.http_headers.Headers) | |
| bodyProducer | Noneor anIBodyProducerprovider which produces the content body to send to the remote HTTP server. | |
| persistent | Set to Truewhen you use HTTP persistent connection, defaults 
toFalse. (type:bool) | 
The absolute URI of the request as bytes, or None
if the absolute URI cannot be determined.
Format this Request as an 
HTTP/1.1 request and write it to the given transport.  If bodyProducer is 
not None, it will be associated with an IConsumer.
| Parameters | transport | The transport to which to write. (type: twisted.internet.interfaces.ITransportprovider) | 
| Returns | A Deferredwhich fires withNonewhen the request has been completely written to the transport or with aFailureif 
there is any problem generating the request bytes. | |