C and C++ web framework. http://rapida.vilor.one/docs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
365 B

/* SPDX-License-Identifier: GPL-3.0-or-later */
/* Copyright 2022 Ivan Polyakov */
#include "route.h"
int rpd_route_init(rpd_route *dest, const char *path, rpd_route_cb cb,
void *userdata)
{
rpd_url url;
if (rpd_url_parse(&url, path)) {
return 1;
}
dest->path = url;
dest->cb = cb;
dest->userdata = userdata;
return 0;
}