diff --git a/examples/http-server/http-server.sh b/examples/http-server/http-server.sh index 2db5f45..d85df9b 100644 --- a/examples/http-server/http-server.sh +++ b/examples/http-server/http-server.sh @@ -4,3 +4,9 @@ $ go run http-servers.go & # Access the `/hello` route. $ curl localhost:8090/hello hello + + +# Access the `/headers` route. +$ curl localhost:8090/headers +Accept: */* +User-Agent: curl/8.1.2 diff --git a/public/http-server b/public/http-server index e2ecdc6..0f7d04e 100644 --- a/public/http-server +++ b/public/http-server @@ -168,13 +168,26 @@ router we’ve just set up.

Access the /hello route.

- +
$ curl localhost:8090/hello
 hello
+ + +

Access the /headers route.

+ + + + +
$ curl localhost:8090/headers
+Accept: */*
+User-Agent: curl/8.1.2
+ + + @@ -190,7 +203,7 @@ router we’ve just set up.