c++ - update a field value in a form using libcurl -
my situation following:
first time form looks below:
first = yes fileupload = file
since after first time, i'd change first = no
but when below keeps adding first = yes no no no no.....
curl_formadd(&formpost, &lastptr, curlform_copyname, "first", curlform_copycontents, "yes", curlform_end) ==>
curl_formadd(&formpost, &lastptr, curlform_copyname, "first", curlform_copycontents, "no", curlform_end) tia
semantics of curl_formadd add section multipart/formdata http post. every time api invoke lastptr updated point end of form. , subsequent invocation appends data it.
i afraid need start form on again set new value. may want use curl_formfree() cleanup form before rebuilding.
Comments
Post a Comment