protected function buildArrayForCurl($params)
    {
        if (isset($params['file'])) {

            // Have cUrl set the correct content type for upload
            $this->setHeader('Content-Type', null);

            // Convert array to a simple cUrl usable array
            return $this->http_build_query_for_curl($params);
        }

        return json_encode($params);
    }