Go Series: Learning How to Build a Web Service Using Go from Scratch Pt. 9— Gin Framework and HTTP Requests
1 min readJun 7, 2023
Go has its own http package. Normally a request can be handled by using net/http
package and simply do
http.HandleFunc("/ping", func(w http.ResponseWriter, r *http.Request) {
// do what we wanna do with the request here
})
_ = http.ListenAndServe(":8080", nil)