feat(web): httputil.WithStatus — configurable success status on the handler adapters (v1.5.0)
This commit is contained in:
@@ -6,6 +6,27 @@ This module adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html
|
||||
|
||||
---
|
||||
|
||||
## [1.5.0] — 2026-08-09
|
||||
|
||||
Minor — configurable success status on the httputil handler adapters.
|
||||
|
||||
### Added
|
||||
|
||||
- **`httputil.WithStatus(code int) Option`** and variadic `opts ...Option` on `Handle`,
|
||||
`HandleNoBody` and `HandleEmpty`. Override the success status — e.g. `WithStatus(201)` on a
|
||||
resource-creating POST, `WithStatus(202)` on an async `HandleEmpty`. Non-breaking: existing
|
||||
calls keep their defaults (200 / 200 / 204).
|
||||
|
||||
### Changed
|
||||
|
||||
- Bumped `contracts`, `core` to v1.5.0.
|
||||
|
||||
### Notes
|
||||
|
||||
- `WithStatus` is success-only: the adapters own only the happy path, so the code must be 2xx.
|
||||
A non-2xx code panics at wiring (the service fails to boot) rather than emitting a wrong
|
||||
status at runtime. Error status stays separate — resolved from the returned xerror by `Error`.
|
||||
|
||||
## [1.4.0] — 2026-08-09
|
||||
|
||||
Minor — resolvable request IDs, plus a dependency refresh.
|
||||
|
||||
Reference in New Issue
Block a user