curl_formget
NAMESYNOPSIS
DESCRIPTION
RETURN VALUE
EXAMPLE
AVAILABILITY
SEE ALSO
NAME
curl_formget - serialize a previously built multipart/formdata HTTP POST chain
SYNOPSIS
#include <curl/curl.h>
void
curl_formget(struct curl_httppost * form, void *userp,
curl_formget_callback append );
DESCRIPTION
curl_formget() is used to serialize data previously built/appended with curl_formadd(3). Accepts a void pointer as second argument named userp which will be passed as the first argument to the curl_formget_callback function.
typedef size_t (*curl_formget_callback)(void *userp, const char *buf, size_t len);
The curl_formget_callback will be executed for each part of the HTTP POST chain. The character buffer passed to the callback must not be freed. The callback should return the buffer length passed to it on success.
If the CURLFORM_STREAM option is used in the formpost, it will prevent curl_formget(3) from working until you’ve performed the actual HTTP request as only then will libcurl get the actual read callback to use!
RETURN VALUE
0 means everything was ok, non-zero means an error occurred
EXAMPLE
size_t
print_httppost_callback(void *arg, const char *buf, size_t
len)
{
fwrite(buf, len, 1, stdout);
(*(size_t *) arg) += len;
return len;
}
size_t
print_httppost(struct curl_httppost *post)
{
size_t total_size = 0;
if(curl_formget(post, &total_size,
print_httppost_callback)) {
return (size_t) -1;
}
return total_size;
}
AVAILABILITY
This function was added in libcurl 7.15.5
SEE ALSO
curl_formadd(3)
More Linux Commands
manpages/glGetMinmax.3gl.html
glGetMinmax(3gl) - get minimum and maximum pixel values.....
glGetMinmax returns the accumulated minimum and maximum pixel values (computed on a per-component basis) in a one-dimensional image of width 2. The first set of
manpages/mkdirhier.1.html
mkdirhier(1) - makes a directory hierarchy - Linux man page
The mkdirhier command creates the specified directories. Unlike mkdir if any of the parent directories of the specified directory do not exist, it creates them
manpages/COLS.3ncurses.html
COLS(3ncurses) - curses global variables - Linux man page...
This page summarizes variables provided by the curses library. A more complete description is given in the curses(3X) manual page. Depending on the configuratio
manpages/offsetof.3.html
offsetof(3) - offset of a structure member - Linux man page
The macro offsetof() returns the offset of the field member from the start of the structure type. This macro is useful because the sizes of the fields that comp
manpages/memccpy.3.html
memccpy(3) - copy memory area (Library - Linux man page)....
The memccpy() function copies no more than n bytes from memory area src to memory area dest, stopping when the character c is found. If the memory areas overlap
manpages/login.1.html
login(1) - Begin session on the system - Linux manual page
login is used when signing onto a system. If no argument is given, login prompts for the username. The user is then prompted for a password, where approprate. E
manpages/locale.conf.5.html
locale.conf(5) - configuration file for locale settings.....
The /etc/locale.conf file configures system-wide locale settings. It is read at early-boot by systemd(1). The basic file format of locale.conf is a newline-sepa
manpages/io_destroy.2.html
io_destroy(2) - destroy an asynchronous I/O context.........
The io_destroy() system call will attempt to cancel all outstanding asynchronous I/O operations against ctx_id, will block on the completion of all operations t
manpages/apropos.1.html
apropos(1) - search the manual page names and descriptions
Each manual page has a short description available within it. apropos searches the descriptions for instances of keyword. keyword is usually a regular expressio
manpages/SDL_ConvertAudio.3.html
SDL_ConvertAudio(3) - Convert audio data to a desired audio
SDL_ConvertAudio takes one parameter, cvt, which was previously initilized. Initilizing a SDL_AudioCVT is a two step process. First of all, the structure must b
manpages/Tk_ImageChanged.3.html
Tk_ImageChanged(3) - notify widgets that image needs to be r
An image manager calls Tk_ImageChanged for an image whenever anything happens that requires the image to be redrawn. As a result of calling Tk_ImageChanged, any
manpages/epoll.4.html
epoll(4) - I/O event notification facility - Linux man page
epoll is a variant of poll(2) that can be used either as an edge-triggered or a level-triggered interface and scales well to large numbers of watched file descr
