support custom status code and message

fix #350