Create a PostProcessor. A PostProcessor can be used to (incrementally) parse the data portion of a
- the connection on which the
POSTis happening (used to determine the
- maximum number of bytes to use for internal buffering (used only for the parsing, specifically the parsing of the keys). A tiny value (256-1024) should be sufficient; do NOT use a value smaller than 256;
- iterator to be called with the parsed data; must NOT be
- custom value to be used as first argument to iterator.
NULLon error (out of memory, unsupported encoding), otherwise a PP handle.
Parse and process
POSTdata. Call this function when
POSTdata is available (usually during an
MHD_AccessHandlerCallback) with the upload_data and upload_data_size. Whenever possible, this will then cause calls to the
- the post processor;
- post_data_len bytes of
- length of post_data.
MHD_NOon error (out-of-memory, iterator aborted, parse error).
Release PostProcessor resources. After this function is being called, the PostProcessor is guaranteed to no longer call its iterator. There is no special call to the iterator to indicate the end of the post processing stream. After destroying the PostProcessor, the programmer should perform any necessary work to complete the processing of the iterator.
MHD_YESif processing completed nicely,
MHD_NOif there were spurious characters or formatting problems with the post request. It is common to ignore the return value of this function.