change: clean up code in robot mitigation module

use a function to check content type in request handler

Signed-off-by: paulyang <y_y@neusoft.com>