Dear Matej, POST data is supplied incrementally via the 'upload_data' and needs to be passed to an MHD_PostProcessor. This is because the POST data generally may not fit into main memory.
See src/examples/post_example.c for an example on how to handle POST data. Happy hacking! Christian On 10/13/2014 02:02 PM, Matej Svejda wrote: > Hello, > > I know some people have asked similar questions but I havent managed to > find one that would resolve my problem: Im trying to use libmicrohttpd > as a server that receives a JSON request via POST and responds to it. > However I cant find a way to access the raw data that I send with my > request. > > MHD_lookup_connection_value(connection, MHD_HEADER_KIND, > "Content-Length") returns the right value but upload_data_size is 0 and > when calling MHD_get_connection_values(connection, MHD_POSTDATA_KIND, > print_con_value, NULL) print_con_value does not get called. > > Any ideas on what I might be missing would be much appreciated. > > Regards, > Matej
0x48426C7E.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
