building rest client