Civetweb API Reference
mg_handle_form_request( conn, fdh );
struct mg_connection *
|The connection on which form data must be processed|
|Structure with callback functions to to the heavy work|
|The number of fields processed, or an error code|
mg_handle_form_request() processes form data on a connection. The function uses callback functions for the heavy lifting which are passed to the function as fields in a
struct mg_form_data_handler structure. The number of processed fields is returned by the function, or a negative value when an error occured. I nthe situation where some fields are processed successfully (for example file downloads) and an error occurs later in the form processing, the function still returns a negative value. It is the responsibility of the calling party to do the necessary cleanup. The calling party should also do the cleanup of any files which are created, but not required anymore later.