Files
go-socket/http.go
T
2026-04-11 23:04:50 +02:00

14 lines
261 B
Go

package main
import (
"net/http"
)
func HttpMethodAllowed(response *http.ResponseWriter, request *http.Request) bool {
if request.Method != http.MethodPost {
http.Error(*response, "POST only", http.StatusMethodNotAllowed)
return false
}
return true
}