Functional rest client