Перенес основы lab3 в lab4

This commit is contained in:
Daria0w0
2026-11-06 14:44:30 +03:00
parent ec540a1a72
commit 9197e151ba
59 changed files with 4761 additions and 3 deletions
+23
View File
@@ -0,0 +1,23 @@
package httpapi
import "net/http"
func handleHealth(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet {
w.Header().Set("Allow", http.MethodGet)
writeError(
w,
http.StatusMethodNotAllowed,
"invalid_request",
"Method not allowed",
)
return
}
writeJSON(w, http.StatusOK, struct {
Status string `json:"status"`
}{
Status: "ok",
})
}