#NEWLINE# @ gen . coroutine #NEWLINE# def args_kwargs( self ) : #NEWLINE# #INDENT# args = [ ] #NEWLINE# if ( self . request . headers . get ( 'Content-Type' ) == 'application/json' ) : #NEWLINE# #INDENT# de_string = self . request . body #NEWLINE# encryption = self . request . headers . get ( 'Encryption' ) #NEWLINE# if ( encryption == 'base64' ) : #NEWLINE# #INDENT# de_string = base64 . decodestring ( self . request . body ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( encryption == 'aes' ) : #NEWLINE# #INDENT# salt = prpcrypt ( self . config . ENCRYPTION_AES ) #NEWLINE# de_string = salt . decrypt ( self . request . body ) #NEWLINE# #UNINDENT# #UNINDENT# data = json . loads ( de_string ) #NEWLINE# args = data . get ( 'args' , [ ] ) #NEWLINE# kwargs = data . get ( 'kwargs' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# raise gen . Return ( ( args , kwargs ) ) #NEWLINE# #UNINDENT# if ( 'args' in self . request . arguments ) : #NEWLINE# #INDENT# args = self . request . arguments [ 'args' ] #NEWLINE# del self . request . arguments [ 'args' ] #NEWLINE# #UNINDENT# kwargs = dict ( [ ( salt , v [ 0 ] ) for ( k , v ) in self . request . arguments . items ( ) ] ) #NEWLINE# raise gen . Return ( ( args , kwargs ) )