changed http_get_repsonse to curl function