OPSI.web2.client.http module¶
-
class
OPSI.web2.client.http.ClientRequest(method, uri, headers, stream)¶ Bases:
objectA class for describing an HTTP request to be sent to the server.
-
class
OPSI.web2.client.http.EmptyHTTPClientManager¶ Bases:
objectA dummy HTTPClientManager. It doesn’t do any client management, and is meant to be used only when creating an HTTPClientProtocol directly.
-
clientBusy(proto)¶
-
clientGone(proto)¶
-
clientIdle(proto)¶
-
clientPipelining(proto)¶
-
-
class
OPSI.web2.client.http.HTTPClientChannelRequest(channel, request, closeAfter)¶ Bases:
OPSI.web2.channel.http.HTTPParser-
chunkedOut= False¶
-
closeAfter= False¶
-
connectionLost(reason)¶
-
createRequest()¶
-
finished= False¶
-
gotInitialLine(initialLine)¶
-
handleContentChunk(data)¶
-
handleContentComplete()¶
-
outgoing_version= 'HTTP/1.1'¶
-
parseCloseAsEnd= True¶
-
processRequest()¶
-
registerProducer(producer, streaming)¶ Register a producer.
-
submit()¶
-
unregisterProducer()¶
-
write(data)¶
-
-
class
OPSI.web2.client.http.HTTPClientProtocol(manager=None)¶ Bases:
twisted.protocols.basic.LineReceiver,twisted.protocols.policies.TimeoutMixin,objectA HTTP 1.1 Client with request pipelining support.
-
chanRequest= None¶
-
connectionLost(reason)¶
-
firstLine= 1¶
-
inputTimeOut= 240¶
-
lineReceived(line)¶
-
maxHeaderLength= 10240¶
-
rawDataReceived(data)¶
-
readPersistent= 1¶
-
requestReadFinished(request)¶
-
requestWriteFinished(request)¶
-
setReadPersistent(persist)¶
-
submitRequest(request, closeAfter=True)¶ @param request: The request to send to a remote server. @type request: L{ClientRequest}
- @param closeAfter: If True the ‘Connection: close’ header will be sent,
- otherwise ‘Connection: keep-alive’
@type closeAfter: C{bool}
@return: L{twisted.internet.defer.Deferred} @callback: L{OPSI.web2.http.Response} from the server.
-
-
exception
OPSI.web2.client.http.ProtocolError¶ Bases:
exceptions.Exception
-
OPSI.web2.client.http.testConn(host)¶