mirror of
https://github.com/Fishwaldo/huma.git
synced 2025-03-15 19:31:27 +00:00
feat: added 206 Partial Content to huma responses.
This commit is contained in:
parent
8aa6989f4c
commit
82f724a1df
2 changed files with 7 additions and 0 deletions
|
@ -38,6 +38,11 @@ func NoContent() huma.Response {
|
|||
return response(http.StatusNoContent)
|
||||
}
|
||||
|
||||
// PartialContent HTTP 206 response
|
||||
func PartialContent() huma.Response {
|
||||
return response(http.StatusPartialContent)
|
||||
}
|
||||
|
||||
// MovedPermanently HTTP 301 response.
|
||||
func MovedPermanently() huma.Response {
|
||||
return response(http.StatusMovedPermanently)
|
||||
|
|
|
@ -19,6 +19,7 @@ var funcs = struct {
|
|||
Created,
|
||||
Accepted,
|
||||
NoContent,
|
||||
PartialContent,
|
||||
MovedPermanently,
|
||||
Found,
|
||||
NotModified,
|
||||
|
@ -55,6 +56,7 @@ func TestResponses(t *testing.T) {
|
|||
http.StatusCreated,
|
||||
http.StatusAccepted,
|
||||
http.StatusNoContent,
|
||||
http.StatusPartialContent,
|
||||
http.StatusMovedPermanently,
|
||||
http.StatusFound,
|
||||
http.StatusNotModified,
|
||||
|
|
Loading…
Add table
Reference in a new issue