#NEWLINE# def prepare_request_params( self , _query_params , _json_params ) : #NEWLINE# #INDENT# ' Prepare query and update params. ' #NEWLINE# self . _query_params = dictset ( ( _query_params or self . request . params . mixed ( ) ) ) #NEWLINE# self . _json_params = dictset ( _json_params ) #NEWLINE# ctype = self . request . content_type #NEWLINE# if ( self . request . method in [ 'POST' , 'PUT' , 'PATCH' ] ) : #NEWLINE# #INDENT# if ( ctype == 'application/json' ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . _json_params . update ( self . request . json ) #NEWLINE# #UNINDENT# except simplejson . JSONDecodeError : #NEWLINE# #INDENT# log . error ( "Expecting JSON. Received: '{}'. Request: {} {}" . format ( self . request . body , self . request . method , ctype . request . url ) ) #NEWLINE# #UNINDENT# #UNINDENT# self . _json_params = BaseView . convert_dotted ( self . _json_params ) #NEWLINE# self . _query_params = BaseView . convert_dotted ( self . _query_params ) #NEWLINE# #UNINDENT# self . _params = self . _query_params . copy ( ) #NEWLINE# self . _params . update ( self . _json_params )