public function makePostFields($postdata) {
        if (is_object($postdata) && !self::isCurlFile($postdata)) {
            $postdata = (array)$postdata;
        }
        $postFields = array();
        foreach ($postdata as $name => $value) {
            $name = urlencode($name);
            if (is_object($value) && !self::isCurlFile($value)) {
                $value = (array)$value;
            }
            if (is_array($value) && !self::isCurlFile($value)) {
                $postFields = $this->makeArrayField($name, $value, $postFields);
            } else {
                $postFields[$name] = $value;
            }
        }
        return $postFields;
    }