10#if !defined(LWIP_HTTPD_CUSTOM_FILES)
11#error "http_rest requires LWIP HTTPD custom files"
23typedef void (*rest_endpoint_handler_t)(
struct restfs_file *);
45int restfs_alloc_buffer(
struct restfs_file *rest_file, uint16_t size);
58void restfs_write_const(
struct restfs_file *rest_file,
const char* str);
68int restfs_write(
struct restfs_file *rest_file,
const uint8_t *buff, uint16_t len);
78int restfs_printf(
struct restfs_file *rest_file,
const char *fmt, ...);
90char* restfs_claim_raw_buffer(
struct restfs_file *rest_file);
98void restfs_release_raw_buffer(
struct restfs_file *rest_file, uint16_t wr_len);
107void rest_init_endpoints(
const struct rest_endpoint* endpoints, uint16_t num_endpoints);
rest_endpoint_handler_t user_function
User defined function to call when this endpoint is requested by a client.
char * uri
URI of endpoint.
Opaque object used for writing REST output data.