Fix deprecation in the curl
Merge pull request #2 from steve228uk/fix-deprecation

Fixed deprecated code