Calling Rest Api From Javascript Example