25#ifndef GNUNET_MHD_LIB_H
26#define GNUNET_MHD_LIB_H
29#include <microhttpd.h>
82 struct MHD_Connection *connection,
84 const char *upload_data,
85 size_t *upload_data_size,
GNUNET_MHD_PostResult
Return codes from GNUNET_MHD_post_parser().
@ GNUNET_MHD_PR_CONTINUE
Parsing continues, call again soon!
@ GNUNET_MHD_PR_SUCCESS
Parsing successful, JSON result is in *json.
@ GNUNET_MHD_PR_OUT_OF_MEMORY
Sorry, memory allocation (malloc()) failed.
@ GNUNET_MHD_PR_REQUEST_TOO_LARGE
Request size exceeded buffer_max argument.
@ GNUNET_MHD_PR_JSON_INVALID
JSON parsing failed.
enum GNUNET_MHD_PostResult GNUNET_MHD_post_parser(size_t buffer_max, struct MHD_Connection *connection, void **con_cls, const char *upload_data, size_t *upload_data_size, json_t **json)
Process a POST request containing a JSON object.
void GNUNET_MHD_post_parser_cleanup(void *con_cls)
Function called whenever we are done with a request to clean up our state.