call rest api from spark scala