Jd rest sample

Adapt the basic sample to use REST to communicate with the server