curl is a command-line tool for sending requests to network services. It is useful for checking a running HTTP server without building a separate client; commands are also easy to repeat and automate. section 8.1.2
Check a local server
Start the Go server with `go run .`, then run `curl http://localhost:8080`. With the initial nil handler, the response is 404. Keep the server running while issuing requests; stop it with Ctrl–C afterward. section 8.1.2
> curl -v localhost:8080/games
Output:
* Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /games HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.81.0
> Accept: */*
> < HTTP/1.1 405 Method Not Allowed
< Content-Length: 0
<
* Connection #0 to host localhost left intact
Run `curl -v localhost:8080/games` to see both sides of the exchange. curl sends GET when no method is specified; this endpoint rejects it with `405 Method Not Allowed`. section 8.2.1
Send the intended method
Run `curl -v -X POST localhost:8080/games`. The verbose output shows a POST request and, in the initial handler, a `200 OK` response with `Creating a new game`. The handler is later changed to send `201 Created`, writing the status before the response body. section 8.2.1

