|
@@ -659,7 +659,7 @@ bool CCurlClient::DownloadEx(const std::string &url, const std::string &path, lo
|
|
|
|
|
|
// 表单提交;
|
|
|
// 注意与普通的post提交区别在于:CURLOPT_POST、CURLOPT_HTTPPOST
|
|
|
-int CCurlClient::FormPost(std::string url, std::map<std::string, std::string> form_data, std::string &result, long time_out)
|
|
|
+int CCurlClient::FormPost(std::string url, std::multimap<std::string, std::string> form_data, std::string &result, long time_out)
|
|
|
{
|
|
|
CURLcode res;
|
|
|
CURL* curl = curl_easy_init();
|
|
@@ -679,7 +679,7 @@ int CCurlClient::FormPost(std::string url, std::map<std::string, std::string> fo
|
|
|
CURLFORMcode rmcode;
|
|
|
struct curl_httppost* formpost = NULL;
|
|
|
struct curl_httppost* lastptr = NULL;
|
|
|
- std::map<std::string, std::string>::iterator it = form_data.begin();
|
|
|
+ std::multimap<std::string, std::string>::iterator it = form_data.begin();
|
|
|
#if 0
|
|
|
for (; it != form_data.end(); )
|
|
|
{
|
|
@@ -746,7 +746,7 @@ int CCurlClient::FormPost(std::string url, std::map<std::string, std::string> fo
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
-int CCurlClient::FormPosts(std::string url, std::map<std::string, std::string> form_data, std::string &result, long time_out)
|
|
|
+int CCurlClient::FormPosts(std::string url, std::multimap<std::string, std::string> form_data, std::string &result, long time_out)
|
|
|
{
|
|
|
CURLcode res;
|
|
|
CURL* curl = curl_easy_init();
|
|
@@ -766,7 +766,7 @@ int CCurlClient::FormPosts(std::string url, std::map<std::string, std::string> f
|
|
|
CURLFORMcode rmcode;
|
|
|
struct curl_httppost* formpost = NULL;
|
|
|
struct curl_httppost* lastptr = NULL;
|
|
|
- std::map<std::string, std::string>::iterator it = form_data.begin();
|
|
|
+ std::multimap<std::string, std::string>::iterator it = form_data.begin();
|
|
|
#if 0
|
|
|
for (; it != form_data.end(); )
|
|
|
{
|