Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
badarihp opened this issue Jun 19, 2017 · 0 comments
Open

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

badarihp opened this issue Jun 19, 2017 · 0 comments

Comments

@badarihp
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant