12#ifndef __ROUTER_LIBEXPRESS_H
13#define __ROUTER_LIBEXPRESS_H 1
16#include <libvector/vector.h>
35 vector_t *middlewares;
36 controller_t* controller;
61 hmap_t *child_routers;
87void route(
router_t *router,
const char *path,
char* method, ...);
This contains all the controller related material.
void route_delete(router_t *router, const char *path,...)
Assign a route for DELETE request for a router.
Definition: router.c:368
route_t * find_route(router_t *router, req_t *req)
Finds the router most appropriate for serving request.
Definition: router.c:144
void route(router_t *router, const char *path, char *method,...)
Assign Route for a specific method for a specific path.
Definition: router.c:284
void route_put(router_t *router, const char *path,...)
Assign a route for PUT request for a router.
Definition: router.c:347
void route_post(router_t *router, const char *path,...)
Assign a route for POST request for a router.
Definition: router.c:326
u_int16_t port_t
Port number.
Definition: router.h:25
void route_get(router_t *router, const char *path,...)
Assign a route for GET request for a router.
Definition: router.c:305
Request made by client.
Definition: req.h:21
Route.
Definition: router.h:34
Router.
Definition: router.h:58
This contains all the utilities used through the library.