Update API response mime type

This commit is contained in:
Alexey Khit
2023-05-31 14:41:57 +03:00
parent 397eb0b6ee
commit 888159d2b6
5 changed files with 16 additions and 14 deletions
+2 -1
View File
@@ -21,7 +21,8 @@ func configHandler(w http.ResponseWriter, r *http.Request) {
http.Error(w, "", http.StatusNotFound)
return
}
ResponseText(w, data)
// https://www.ietf.org/archive/id/draft-ietf-httpapi-yaml-mediatypes-00.html
Response(w, data, "application/yaml")
case "POST", "PATCH":
data, err := io.ReadAll(r.Body)