Typedefs | Functions
http_static_route.h File Reference

Route for programmed responses. More...

Typedefs

typedef int(* vtm_http_static_rt_handle_fn )(struct vtm_http_ctx *ctx, struct vtm_http_req *req, vtm_http_res *res)
 

Functions

VTM_API struct vtm_http_routevtm_http_static_rt_new (const char *url_path, vtm_http_static_rt_handle_fn fn_handle)
 

Function Documentation

VTM_API struct vtm_http_route* vtm_http_static_rt_new ( const char *  url_path,
vtm_http_static_rt_handle_fn  fn_handle 
)

Creates a route for programmed responses.

Parameters
url_paththe path where the route is bound
fn_handlethe function that is called upon a request
Returns
http route if call succeeded
NULL if an error occured