diff --git a/dub.json b/dub.json index 7bc2b0c..0c70e55 100644 --- a/dub.json +++ b/dub.json @@ -4,10 +4,10 @@ ], "copyright": "Copyright © 2023, Andrew Lalis", "dependencies": { - "handy-httpd": "~>7.7.0", + "handy-httpd": "~>7.13.0", "requests": "~>2.1.1", "scheduled": "~>1.2.0", - "slf4d": "~>2.4.2" + "slf4d": "~>2.4.3" }, "description": "HTTP server for generating schematic materials lists.", "license": "proprietary", diff --git a/dub.selections.json b/dub.selections.json index 0070ff0..befefbb 100644 --- a/dub.selections.json +++ b/dub.selections.json @@ -4,11 +4,12 @@ "automem": "0.6.9", "cachetools": "0.4.1", "cronexp": "0.1.0-beta3", - "handy-httpd": "7.7.0", + "handy-httpd": "7.13.0", "httparsed": "1.2.1", + "path-matcher": "1.1.3", "requests": "2.1.1", "scheduled": "1.2.0", - "slf4d": "2.4.2", + "slf4d": "2.4.3", "streams": "3.5.0", "test_allocator": "0.3.4", "unit-threaded": "0.10.8" diff --git a/source/csgs/http.d b/source/csgs/http.d index 2ca997b..40030eb 100644 --- a/source/csgs/http.d +++ b/source/csgs/http.d @@ -1,7 +1,7 @@ module csgs.http; import handy_httpd; -import handy_httpd.handlers.path_delegating_handler; +import handy_httpd.handlers.path_handler; import handy_httpd.handlers.file_resolving_handler; import slf4d; import std.path; @@ -14,9 +14,9 @@ void startServer() { config.connectionQueueSize = 10; config.port = 8100; - PathDelegatingHandler handler = new PathDelegatingHandler(); + auto handler = new PathHandler(); handler.addMapping(Method.POST, "/extracts", &handleExtract); - handler.addMapping(Method.GET, "/extracts/{extractId}", &getExtract); + handler.addMapping(Method.GET, "/extracts/:extractId", &getExtract); handler.addMapping(Method.POST, "/item-reports", &handleItemReport); handler.addMapping(Method.GET, "/item-reports", &getItemReports); handler.addMapping(Method.GET, "/status", (ref HttpRequestContext ctx) {