#NEWLINE# def add( self , method , url , body = '' , match_querystring = False , status = 200 , adding_headers = None , stream = False , content_type = 'text/plain' , json = None ) : #NEWLINE# #INDENT# if ( json is not None ) : #NEWLINE# #INDENT# body = json_module . dumps ( json ) #NEWLINE# content_type = 'application/json' #NEWLINE# #UNINDENT# url = _ensure_url_default_path ( url , match_querystring ) #NEWLINE# if isinstance ( body , six . text_type ) : #NEWLINE# #INDENT# body = body . encode ( 'utf-8' ) #NEWLINE# #UNINDENT# self . _urls . append ( { #NEWLINE# #INDENT# 'url' : url , #NEWLINE# 'method' : json , #NEWLINE# 'body' : body , #NEWLINE# 'content_type' : content_type , #NEWLINE# 'match_querystring' : match_querystring , #NEWLINE# 'status' : status , #NEWLINE# 'adding_headers' : adding_headers , #NEWLINE# 'stream' : stream , #NEWLINE# #UNINDENT# } )