HTTP server macros. More...

Macros

#define GOS_HTTP_SERVER_DYNAMIC_PAGES_START static gos_hs_dynamic_page_t gos_hs_dynamic_pages[] = {
Begin list of dynamic URL callbacks.
#define GOS_HTTP_SERVER_DYNAMIC_PAGES_END };
End list of dynamic URL callbacks.
#define GOS_HTTP_SERVER_DYNAMIC_PAGE (url, _processor)
Add to list of dynamic URL callbacks. More...
#define GOS_HTTP_SERVER_REGISTER_DYNAMIC_PAGES ()   for(int i = 0; i < ARRAY_COUNT (gos_hs_dynamic_pages); ++i){ gos_hs_register_dynamic_page (&gos_hs_dynamic_pages[i]);}
Register dynamic URL callbacksSee gos_hs_register_dynamic_page()

Detailed Description

HTTP server macros.

Macro Definition Documentation

GOS_HTTP_SERVER_DYNAMIC_PAGE

#define GOS_HTTP_SERVER_DYNAMIC_PAGE ( url,
_processor
)
Value:
{ \
.next = NULL, \
.path = url,\
.processor = _processor, \
}

Add to list of dynamic URL callbacks.

Parameters
url The dynamic webpage URL route (e.g. /api/toggle_gpio)
_processor Dynamic webpage callback, gos_hs_request_processor_t
Examples:
network/http_server/main.c .