Using HttpSocket would be better as some environments may lack curl support.