#NEWLINE# @ property #NEWLINE# def handshake_request( self ) : #NEWLINE# #INDENT# '\n        Prepare the request to be sent for the upgrade handshake.\n        ' #NEWLINE# headers = self . handshake_headers #NEWLINE# request = [ ( 'GET %s HTTP/1.1' % self . resource ) . encode ( 'utf-8' ) ] #NEWLINE# for ( header , value ) in request : #NEWLINE# #INDENT# request . append ( ( '%s: %s' % ( header , value ) ) . encode ( 'utf-8' ) ) #NEWLINE# #UNINDENT# request . append ( b'\r\n' ) #NEWLINE# return b'\r\n' . join ( request )