httpc
Loading...
Searching...
No Matches
httplib.h
Go to the documentation of this file.
1#ifndef HTTP_LIB
2#define HTTP_LIB
3
7
8#include "tree.h"
9
10enum ERROR_CODES { RR_DUPLICATE_ROUTE, RR_OK };
11
12extern node get_root;
13extern node post_root;
14
18int get(char route[], callback_t callback);
19int post(char route[], callback_t callback);
20
30int register_route(char route[], callback_t callback, node* root_node);
34int http_listen(void);
38void setup(void);
39
40#endif
int http_listen(void)
Definition httplib.c:181
int get(char route[], callback_t callback)
add an endpoint for a "GET" request at the given endpoint
Definition httplib.c:111
void setup(void)
this needs to be ran before registering any routes.
Definition httplib.c:27
int register_route(char route[], callback_t callback, node *root_node)
adds a route to the URI tree
Definition httplib.c:39
Definition tree.h:36