#NEWLINE# def __init__( self , counter , method , path , headers , content ) : #NEWLINE# #INDENT# channel = HTTPChannel ( ) #NEWLINE# host = IPv4Address ( b'TCP' , b'127.0.0.1' , 80 ) #NEWLINE# channel . makeConnection ( StringTransport ( hostAddress = host ) ) #NEWLINE# Request . __init__ ( self , channel , False ) #NEWLINE# self . _counter = counter #NEWLINE# self . prepath = [ ] #NEWLINE# self . requestHeaders = headers #NEWLINE# self . content = BytesIO ( content ) #NEWLINE# self . requestReceived ( method , content , b'HTTP/1.1' ) #NEWLINE# self . postpath = list ( map ( unquote , self . path [ 1 : ] . split ( b'/' ) ) ) #NEWLINE# self . _finished = False #NEWLINE# self . _finishedChannel = EventChannel ( ) #NEWLINE# self . _responseBody = b''