aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-06-24 21:46:41 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-06-24 21:46:41 +0000
commit37f4877e569cdd0d1afa6bb0d7cd3a463ee75ac9 (patch)
tree92346fb5f8cdc2114f5df2ece56a1544aef380dc /include
parenta6fc45c02f75467a171f55e5154047c86c0ed85e (diff)
Michael Wallner added curl_formget(), which allows an application to extract
(serialise) a previously built formpost (as with curl_formadd()).
Diffstat (limited to 'include')
-rw-r--r--include/curl/curl.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/curl/curl.h b/include/curl/curl.h
index 79e71ca0a..1a118a36c 100644
--- a/include/curl/curl.h
+++ b/include/curl/curl.h
@@ -1159,6 +1159,26 @@ CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost,
...);
/*
+ * callback function for curl_formget()
+ * The void *arg pointer will be the one passed as second argument to curl_formget().
+ * The character buffer passed to it must not be freed.
+ * Should return the buffer length passed to it as the argument "len" on success.
+ */
+typedef size_t (*curl_formget_callback)(void *arg, const char *buf, size_t len);
+
+/*
+ * NAME curl_formget()
+ *
+ * DESCRIPTION
+ *
+ * Serialize a curl_httppost struct built with curl_formadd().
+ * Accepts a void pointer as second argument which will be passed to
+ * the curl_formget_callback function.
+ * Returns 0 on success.
+ */
+CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg,
+ curl_formget_callback append);
+/*
* NAME curl_formfree()
*
* DESCRIPTION