added code to make http call to remote rest api