Rewritten HTTP class with curl, fixes http version not supported errors (#1)