jf-framework
Loading...
Searching...
No Matches
router.h
Go to the documentation of this file.
1
6
7#ifndef JF_FRAMEWORK_ROUTER_H
8#define JF_FRAMEWOR_ROUTER_H
9
10#include <http.h>
11#include <stdint.h>
12
13#define MAX_ROUTES 128
14
15typedef void (*route_handler_t)(const HttpRequest* request, HttpResponse* response);
16
17typedef struct {
18 char method[8];
19 char path[256];
20 route_handler_t handler;
21} Route;
22
23uint32_t jf_RouterAdd(const char* method, const char* path, const char* router, route_handler_t handler);
24void jf_CreateRouter(void);
25
26#endif
void jf_CreateRouter(void)
Definition router.c:43
uint32_t jf_RouterAdd(const char *method, const char *path, const char *router, route_handler_t handler)
Definition router.c:19
Definition http.h:14
Definition http.h:36
Definition router.h:17