2024-02-03 16:26:09 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
2024-02-04 08:17:32 +00:00
|
|
|
fmt.Println(r.Header)
|
2024-02-03 16:26:09 +00:00
|
|
|
fmt.Fprintf(w, "Hello World!")
|
|
|
|
w.WriteHeader(200)
|
|
|
|
})
|
|
|
|
http.ListenAndServe(":8081", nil)
|
|
|
|
}
|