public function init(array $initVars) {
        if (filter_var($initVars['url'], FILTER_VALIDATE_URL)) {
            $this->handle = curl_init($initVars['url']);

            // If headers are set
            if (isset($initVars['headers'])) {
                $this->setOpt(CURLOPT_HTTPHEADER, $initVars['headers']);
            }

            // Set method of request
            switch ($initVars['method']) {
                case 'GET':
                    break;
                case 'PUT':
                    $this->setOpt(CURLOPT_CUSTOMREQUEST, 'PUT');
                    $this->setOpt(CURLOPT_POSTFIELDS, $initVars['data']);
                    break;
                case 'POST':
                    $this->setOpt(CURLOPT_CUSTOMREQUEST, 'POST');
                    $this->setOpt(CURLOPT_POSTFIELDS, $initVars['data']);
                    break;
                default:
                    break;
            }

            return true;
        } else {
            return false;
        }
    }