REST client function done