Add host
All checks were successful
/ build (push) Successful in 1m4s

This commit is contained in:
Aykhan Shahsuvarov 2025-03-13 16:10:42 +04:00
parent ace44b0d6d
commit b9e9cfc57d

View File

@ -11,6 +11,10 @@ import (
func handler(w http.ResponseWriter, r *http.Request) {
fmt.Println(strings.Repeat("~", 80))
if r.Host != "" {
fmt.Printf("Host: %s\n\n", r.Host)
}
if len(r.Header) > 0 {
fmt.Println("--- Headers ---")
for name, values := range r.Header {