38 fwrite(buf, len, 1, stdout);
39 (*(
size_t *) arg) +=
len;
51 CURLFORM_COPYCONTENTS,
"content", CURLFORM_END);
57 fail_unless(post == last,
"post and last weren't the same");
60 CURLFORM_COPYCONTENTS,
"<HTML></HTML>",
61 CURLFORM_CONTENTTYPE,
"text/html", CURLFORM_END);
65 rc =
curl_formadd(&post, &last, CURLFORM_COPYNAME,
"name_for_ptrcontent",
66 CURLFORM_PTRCONTENTS,
buffer, CURLFORM_END);
82 CURLFORM_PTRNAME,
"name of file field",
83 CURLFORM_FILE,
"log/test-1308",
84 CURLFORM_FILENAME,
"custom named file",
struct curl_httppost * post
static size_t print_httppost_callback(void *arg, const char *buf, size_t len)
struct curl_httppost * last
CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost, struct curl_httppost **last_post,...)
static CURLcode unit_setup(void)
CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg, curl_formget_callback append)
fail_unless(rc==0,"curl_formadd returned error")
static void unit_stop(void)