remove duplicate code, CURLOPT_RETURNTRANSFER is set twice