cURL - Can't send large data in post field ?

Hey guys, i m working on some PHP API in my C++ application.
Can you guys tell me how to send a larger pfield data, if it exceeds 18 chars it wont send the post datas.
1
2
3
4
5
6
7
8
9
10
	if (curl) {
		curl_easy_setopt(curl, CURLOPT_URL, url);
		curl_easy_setopt(curl, CURLOPT_POST, 1L);
		curl_easy_setopt(curl, CURLOPT_POSTFIELDS, pfield.str().c_str());
		curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
		curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
		res = curl_easy_perform(curl);
		curl_easy_cleanup(curl);
		MessageBox(0, response.c_str(), 0, 0);
	}
Last edited on
You didn't specify CURLOPT_POSTFIELDSIZE.

https://curl.haxx.se/libcurl/c/CURLOPT_POSTFIELDS.html
Topic archived. No new replies allowed.