#ifndef LIBWEB_FORM_H
#define LIBWEB_FORM_H

#include <stddef.h>

typedef int (*form_iter)(const char *key, const char *value, void *user);

struct form;

int form_alloc(const char *data, struct form **f);
const char *form_value(const struct form *f, const char *key);
int form_foreach(const struct form *f, form_iter it, void *user);
void form_free(struct form *f);

#endif
