Rest client sample code