port old client code to new client code + add post method to client
port code