refine ajax request wrapper