refactor request class and http module