The generic parser stores the POST data in the upload
brigade of a param named “_dummy_” but it’s not in
the output table, its in the parser’s ctx pointer.
The struct is declared in parser.c so it’s technically
private but the param is in the first slot and that’s
meant to be public.
On Nov 8, 20
Finally got some working code. Registered the parser for the content type:
apreq_register_parser("application/json", apreq_parse_generic);
in a pre_init hook, then normal apreq_handle_apache2 and apreq_body calls, then
a apreq_parser_get call to get the parser and:
dummy = *(apreq_param_t *
No that’s fine if you don’t mind enabling your the
parser for ALL json stuff. It’d probably have been
saner for us to have the dummy param appear in the
body table, but what you’re doing will work reliably
and isn’t too much more conceptually difficult.
On Nov 9, 2013, at 3:00 PM, Brian J. Franc