create mini http client

This commit is contained in:
2024-02-03 23:26:09 +07:00
commit f0f1e83c60
7 changed files with 149 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
package main
import (
"fmt"
"net/http"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello World!")
w.WriteHeader(200)
})
http.ListenAndServe(":8081", nil)
}