use `mg_set_request_handler`
Merge pull request #316 from To1ne/master

use `mg_set_request_handler`