REST client js exemple