Commit Graph

5 Commits

Author SHA1 Message Date
ba7aa79f56 feat(http): add error handling for invalid HTTP methods
- Introduce `InvalidHttpMethodError` for unrecognized HTTP methods.
- Enhance type safety in `HttpKernel` by using generic contexts.
- Update `ResponseDecorator` to accept context for enriched responses.

Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 12:35:41 +02:00
a236fa7c97 feat(http): enhance type safety and extend route context
- Refactor HttpKernel and related interfaces to support generic contexts.
- Add typed query parameters, route params, and state to IContext.
- Introduce HttpMethod type for stricter HTTP method validation.
- Update RouteBuilder and middleware to handle generic contexts.
- Improve test cases to verify compatibility with new types.

Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 12:29:49 +02:00
82a6877485 test(utils): rename and update import paths in test file
- Rename test file for better alignment with its purpose.
- Update relative import paths to reflect the new file location.

Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 12:29:10 +02:00
94525fce52 test(utils): add unit tests for parseQuery function
- Introduce comprehensive tests for the parseQuery utility.
- Validate handling of single and multi-value query parameters.
- Ensure empty query strings return an empty object.
- Confirm repeated keys are grouped into arrays.

Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 12:28:51 +02:00
1d2e89feca First commit
Signed-off-by: Max P. <Mail@MPassarello.de>
2025-05-07 10:53:56 +02:00