Skip to content

Option to insert route with Content-Type as part of arguments #102

@badarihp

Description

@badarihp

Hi ,
Very much impressed by the implementation and performance of this library. I was looking for a API like r3_tree_insert_routel_ex that can take Content-Type as part of arguments while insert the route.
Let me know if we have any such API for my requirements :

For Ex:
tree.insert_routel(METHOD_GET | METHOD_POST, "/blog/post", "application/json",
sizeof("/blog/post") - 1, &route_data);

... find the route :
r3::MatchEntry entry("/blog/post");
entry.set_request_method(METHOD_GET);
entry.set_content_type("application/json");

r3::Route matched_route = tree.match_route(entry);

Regards,
Badari

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions