Throwing cURL exception in http() method

Related to issue #180