-
-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POST sample string reference error #57
Comments
I think that as the last comment on issue #18 say the problem is that you are keeping a reference to a temporary object (the string that is create when you pass a const char* to a function that require a string). @TcT2k try if this commit fix the problem: wise86-android@be68022 |
@TcT2k is this issue solved? |
@TcT2k any news? |
In the post sample this line uses the "user" constant, but in curl_pair the value is a reference:
curl_pair<CURLformoption,string> name_form(CURLFORM_COPYNAME,"user");
It only works when changed like this because of the scope of the string:
std::string fieldName = "user"; curl_pair<CURLformoption,string> name_form(CURLFORM_COPYNAME, fieldName);
Maybe
curl_pair
should copy the value? But at least the sample should be changed.The text was updated successfully, but these errors were encountered: