refine http request, add test cases