[Twisted-web] Example http client in web2

Brian Carmalt bca at contact.de
Thu Feb 28 09:45:12 EST 2008

Hello David,

thanks for your answer and your offer to help. I've already got a server 
running with web2. It supports
streaming reads and writes and digest authentication. I would like to 
have the same on the the client side.
The streaming however is not files from disk, but on the fly data 
received from a client of my client.
This means I need to open a connection, pump data into it as it arrives 
or read data from it as requested,
and then close it when I am done. Is this possible with the 
twisted.web2.client.http? I think I need to wrap
the incoming data stream in a producer which implements IProducer and 
pass the producer to a POST connection,
which should act as a consumer and send the data on its way as it 
arrives. And Conversely for a GET connection.

Does that sound OK, or am I shooting in the dark?

Thanks, Brian

PS. Thanks to Cameron for his Client code. Unfortunately it doesn't deal 
with the streaming problem.

More information about the Twisted-web mailing list