Refactor Client get and post methods