Skip to content

Commit f8f6062

Browse files
etrclaude
andcommitted
TASK-025: mark action items checked (status: In Progress)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9daf303 commit f8f6062

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

specs/tasks/M4-handlers/TASK-025.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
Add the lambda-first handler model that lets a stateless endpoint be registered without subclassing.
99

1010
**Action Items:**
11-
- [ ] Add `webserver::on_get(const std::string& path, std::function<http_response(const http_request&)> handler);`.
12-
- [ ] Same for `on_post`, `on_put`, `on_delete`, `on_patch`, `on_options`, `on_head`.
13-
- [ ] Internally, each `on_*` builds a `route_entry` whose `method_set` carries exactly that one method, then registers it in the appropriate route-table tier (hash for exact, radix for parameterized).
14-
- [ ] Multiple `on_*` calls on the same path compose: each call adds the corresponding method bit; conflicting handlers on the same (method, path) pair throw `std::invalid_argument`.
15-
- [ ] Make sure the variant in `route_entry` can hold both `std::function<http_response(const http_request&)>` (lambda) and `std::shared_ptr<http_resource>` (class) — see §4.7.
16-
- [ ] Add a parallel `on_get` (etc.) that takes `(method_set methods, ...)` if useful, or defer that to TASK-026's generic `route()`.
11+
- [x] Add `webserver::on_get(const std::string& path, std::function<http_response(const http_request&)> handler);`.
12+
- [x] Same for `on_post`, `on_put`, `on_delete`, `on_patch`, `on_options`, `on_head`.
13+
- [x] Internally, each `on_*` builds a `route_entry` whose `method_set` carries exactly that one method, then registers it in the appropriate route-table tier (hash for exact, radix for parameterized). (TASK-025 ships the §4.7-shape `detail::route_entry` type plus the on_* entry points; storage is the existing v1 three-map shape via a hidden `detail::lambda_resource` shim. TASK-027 will plumb `route_entry` into the real 3-tier table.)
14+
- [x] Multiple `on_*` calls on the same path compose: each call adds the corresponding method bit; conflicting handlers on the same (method, path) pair throw `std::invalid_argument`.
15+
- [x] Make sure the variant in `route_entry` can hold both `std::function<http_response(const http_request&)>` (lambda) and `std::shared_ptr<http_resource>` (class) — see §4.7. (Pinned by `static_assert` in `test/unit/webserver_on_methods_test.cpp`.)
16+
- [ ] Add a parallel `on_get` (etc.) that takes `(method_set methods, ...)` if useful, or defer that to TASK-026's generic `route()`. (Deferred to TASK-026 per plan §4.3.)
1717

1818
**Dependencies:**
1919
- Blocked by: TASK-005, TASK-009, TASK-014
@@ -28,4 +28,4 @@ Add the lambda-first handler model that lets a stateless endpoint be registered
2828
**Related Requirements:** PRD-HDL-REQ-001, PRD-HDL-REQ-002
2929
**Related Decisions:** DR-004, §4.7
3030

31-
**Status:** Not Started
31+
**Status:** In Progress

0 commit comments

Comments
 (0)