Add JavaScript example for hitting REST API