C/c++ drop mime code example

Example: C/c++ drop mime

struct curl_httppost * post = NULL;
 struct curl_httppost * last = NULL;
 curl_formadd (& post, & last,
              CURLFORM_COPYNAME, "nom",
              CURLFORM_COPYCONTENTS, "daniel", CURLFORM_END);
 curl_formadd (& post, & last,
              CURLFORM_COPYNAME, "projet",
              CURLFORM_COPYCONTENTS, "curl", CURLFORM_END);
 curl_formadd (& post, & last,
              CURLFORM_COPYNAME, "logotype-image",
              CURLFORM_FILECONTENT, "curl.png", CURLFORM_END);
 
 / * Définissez les informations du formulaire * /
 curl_easy_setopt (easyhandle, CURLOPT_HTTPPOST, poste);
 
 curl_easy_perform (easyhandle); / * postez loin! * /
 
 / * libérer à nouveau les données de la publication * /
 curl_formfree (post);

Tags:

Misc Example