Michael Wallner added curl_formget(), which allows an application to extract

(serialise) a previously built formpost (as with curl_formadd()).
This commit is contained in:
Daniel Stenberg
2006-06-24 21:46:41 +00:00
parent a6fc45c02f
commit 37f4877e56
6 changed files with 138 additions and 6 deletions

View File

@@ -1158,6 +1158,26 @@ CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost,
struct curl_httppost **last_post,
...);
/*
* 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()
*