#NEWLINE# def __applyResponse( self , request , code , headers = { #NEWLINE# #INDENT# 'content-type' : MediaType . TEXT_PLAIN , #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# request . setResponseCode ( code ) #NEWLINE# if ( headers != None ) : #NEWLINE# #INDENT# for ( header , value ) in headers . iteritems ( ) : #NEWLINE# #INDENT# request . setHeader ( header , value )