#NEWLINE# def deserialize_body( self , request , action ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# content_type = request . best_match_content_type ( ) #NEWLINE# #UNINDENT# except exception . InvalidContentType : #NEWLINE# #INDENT# LOG . debug ( 'Unrecognized Content-Type provided in request' ) #NEWLINE# return { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# if ( content_type is None ) : #NEWLINE# #INDENT# LOG . debug ( 'No Content-Type provided in request' ) #NEWLINE# return { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# if ( not ( len ( request . body ) > 0 ) ) : #NEWLINE# #INDENT# LOG . debug ( 'Empty body provided in request' ) #NEWLINE# return { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# deserializer = self . get_body_deserializer ( content_type ) #NEWLINE# #UNINDENT# except exception . InvalidContentType : #NEWLINE# #INDENT# with excutils . save_and_reraise_exception ( ) : #NEWLINE# #INDENT# LOG . debug ( 'Unable to deserialize body as provided Content-Type' ) #NEWLINE# #UNINDENT# #UNINDENT# return deserializer . deserialize ( request . body , action )