Skip to content

Missing response helpers: Accepted, NoContent #17

Description

@rluders

`response_helpers.go` has `OK`, `OKWithMeta`, and `Created`, but no `Accepted` (202) or `NoContent` (204) — both common for async-job-style and delete/update-with-empty-body endpoints. `ReplyBuilder` (the fluent path) has the same gap: `OK`/`Created` methods exist, no `Accepted`/`NoContent`.

Current workaround is the generic `Respond(data).Status(http.StatusAccepted).Write(w)` / `Respondany.Status(http.StatusNoContent).Write(w)`, which works but is exactly the "low-level escape hatch" the direct helpers exist to avoid.

Requested:
```go
func Accepted[T any](w http.ResponseWriter, data T)
func NoContent(w http.ResponseWriter)
```
plus `ReplyBuilder.Accepted`/`ReplyBuilder.NoContent` for the header/meta-configured path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions