Http refactoring, get and post