34 #ifndef GNUNET_REST_LIB_H
35 #define GNUNET_REST_LIB_H
39 #include <microhttpd.h>
41 #define GNUNET_REST_HANDLER_END { NULL, NULL, NULL }
92 const char *
namespace;
111 struct MHD_Response *resp,
static struct GNUNET_CADET_MessageHandler handlers[]
Handlers, for diverse services.
static struct GNUNET_DNS_Handle * handle
Handle to transport service.
uint32_t data
The data value.
uint16_t status
See PRISM_STATUS_*-constants.
struct MHD_Response * GNUNET_REST_create_response(const char *data)
Create REST MHD response.
int GNUNET_REST_handle_request(struct GNUNET_REST_RequestHandle *conn, const struct GNUNET_REST_RequestHandler *handlers, struct GNUNET_REST_RequestHandlerError *err, void *cls)
void(* GNUNET_REST_ResultProcessor)(void *cls, struct MHD_Response *resp, int status)
Iterator called on obtained result for a REST result.
int GNUNET_REST_namespace_match(const char *url, const char *namespace)
Check if namespace is in URL.
Internal representation of the hash map.
struct GNUNET_CONTAINER_MultiHashMap * header_param_map
Map of headers.
const char * data
The POST data.
const char * url
The url as string.
const char * method
The HTTP method as MHD value (see microhttpd.h)
struct GNUNET_CONTAINER_MultiHashMap * url_param_map
Map of url parameters.
size_t data_size
The POST data size.
void(* proc)(struct GNUNET_REST_RequestHandle *handle, const char *url, void *cls)
Namespace to handle.
const char * method
Http method to handle.