protected function execute($request_type, $form = array())
    {
        // Set the HTTP request type
        curl_setopt($this->client->ch, CURLOPT_CUSTOMREQUEST, $request_type);

        // If additional data is delivered, we will send it along with the API request
        if (is_array($form) && ! empty($form)) {
            curl_setopt($this->client->ch, CURLOPT_POSTFIELDS, $this->httpBuildQuery($form, '', '&'));
        }

        // Store received headers in temporary memory file, remember sent headers
        $fh_header = fopen('php://temp', 'w+');
        curl_setopt($this->client->ch, CURLOPT_WRITEHEADER, $fh_header);
        curl_setopt($this->client->ch, CURLINFO_HEADER_OUT, true);

        // Execute the request
        $response_data = curl_exec($this->client->ch);

        if (curl_errno($this->client->ch) !== 0) {
            // An error occurred
            fclose($fh_header);
            throw new Exception(curl_error($this->client->ch), curl_errno($this->client->ch));
        }

        // Grab the headers
        $sent_headers = curl_getinfo($this->client->ch, CURLINFO_HEADER_OUT);
        rewind($fh_header);
        $received_headers = stream_get_contents($fh_header);
        fclose($fh_header);

        // Retrieve the HTTP response code
        $response_code = (int) curl_getinfo($this->client->ch, CURLINFO_HTTP_CODE);

        // Return the response object.
        return new Response($response_code, $sent_headers, $received_headers, $response_data);
    }