Example http improved
This commit is contained in:
parent
28962d2d44
commit
e02f6b5cee
@ -10,7 +10,7 @@ type MyHandler int
|
|||||||
|
|
||||||
func (MyHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
|
func (MyHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
|
||||||
resp.Header().Set("Content-Type", "text/plain")
|
resp.Header().Set("Content-Type", "text/plain")
|
||||||
io.WriteString(resp, req.URL.Path)
|
io.WriteString(resp, req.RequestURI)
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
Loading…
Reference in New Issue
Block a user