Marton Greber has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/21920 )
Change subject: Implement path parameter handling in webserver ...................................................................... Implement path parameter handling in webserver Introduced path parameter parsing in the webserver to support dynamic REST API endpoints. Parameters within URIs are now identified using <parameter_name> notation. Extracted parameters are passed to the WebRequest as path_params. Example usage: Registering a path like "/api/v1/tables/<table_id>" will map the corresponding part of the URI to the table_id key in the path_params of the WebRequest. Query parameter handling won't change with path parameters. Example for query and path parameters: Given path "api/v1/tables/<table_id>", we can reach URIs like "api/v1/tables/1234?var1=1". We can find these in the following way, assuming we have a WebRequest struct. req.parsed_args["var1"] = "1" req.path_params["table_id"] = "1234" Change-Id: Id2085c55d3b86985c87c5fd5a8b48568f8e6fa63 Reviewed-on: http://gerrit.cloudera.org:8080/21920 Tested-by: Kudu Jenkins Reviewed-by: Zoltan Chovan <[email protected]> Reviewed-by: Marton Greber <[email protected]> --- M src/kudu/server/webserver-test.cc M src/kudu/server/webserver.cc M src/kudu/server/webserver.h M src/kudu/util/web_callback_registry.h 4 files changed, 199 insertions(+), 18 deletions(-) Approvals: Kudu Jenkins: Verified Zoltan Chovan: Looks good to me, but someone else must approve Marton Greber: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/21920 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id2085c55d3b86985c87c5fd5a8b48568f8e6fa63 Gerrit-Change-Number: 21920 Gerrit-PatchSet: 11 Gerrit-Owner: Gabriella Lotz <[email protected]> Gerrit-Reviewer: Gabriella Lotz <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Marton Greber <[email protected]> Gerrit-Reviewer: Zoltan Chovan <[email protected]>
