Refactor client#get and client#post