#NEWLINE# def head( self , path , data = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , **extra ) : #NEWLINE# #INDENT# 'Construct a HEAD request.' #NEWLINE# parsed = urlparse ( path ) #NEWLINE# r = { #NEWLINE# #INDENT# 'CONTENT_TYPE' : str ( 'text/html; charset=utf-8' ) , #NEWLINE# 'PATH_INFO' : self . _get_path ( parsed ) , #NEWLINE# 'QUERY_STRING' : ( urlencode ( path , doseq = True ) or force_str ( parsed [ 4 ] ) ) , #NEWLINE# 'REQUEST_METHOD' : str ( 'HEAD' ) , #NEWLINE# #UNINDENT# } #NEWLINE# r . update ( extra ) #NEWLINE# return self . request ( ** r )