Rest client implementation