Part of twisted.web._newclient View Source View In Hierarchy
Request
instance describes an HTTP request to be sent to an HTTP server.Instance Variable | method | The HTTP method to for this request, ex: 'GET', 'HEAD', 'POST', etc. (type: str ) |
Instance Variable | uri | The relative URI of the resource to request. For example,
'/foo/bar?baz=quux' . (type: str ) |
Instance Variable | 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 ) |
Instance Variable | bodyProducer | None or an IBodyProducer
provider which produces the content body to send to the remote HTTP server. |
Instance Variable | persistent | Set to True when you use HTTP persistent connection. (type: bool ) |
Method | __init__ | Undocumented |
Method | writeTo | 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 . |
Method | stopWriting | No summary |
Method | _writeHeaders | Undocumented |
Method | _writeToChunked | Write this request to the given transport using chunked transfer-encoding to frame the body. |
Method | _writeToContentLength | Write this request to the given transport using content-length to frame the body. |
twisted.web.http_headers.Headers
)
None
or an IBodyProducer
provider which produces the content body to send to the remote HTTP server.
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
.Returns | A Deferred
which fires with None when the request has been completely
written to the transport or with a Failure if
there is any problem generating the request bytes. |