curl to retrieve data