@@ -595,11 +595,11 @@ app2 = serve personAPI server4
595And we're good to go:
595And we're good to go:
598− $ curl http://localhost:8081/persons
598+$ curl http://localhost:8081/persons
599− [{"lastName":"Newton","firstName":"Isaac"},{"lastName":"Einstein","firstName":"Albert"}]
599+[{"lastName":"Newton","firstName":"Isaac"},{"lastName":"Einstein","firstName":"Albert"}]
600− $ curl -H 'Accept: text/html' http://localhost:8081/persons
600+$ curl -H 'Accept: text/html' http://localhost:8081/persons
601− <table><tr><td>first name</td><td>last name</td></tr><tr><td>Isaac</td><td>Newton</td></tr><tr><td>Albert</td><td>Einstein</td></tr></table>
601+<table><tr><td>first name</td><td>last name</td></tr><tr><td>Isaac</td><td>Newton</td></tr><tr><td>Albert</td><td>Einstein</td></tr></table>
602− # or just point your browser to http://localhost:8081/persons
602+# or just point your browser to http://localhost:8081/persons
605## The `ExceptT ServantErr IO` monad
605## The `ExceptT ServantErr IO` monad
@@ -713,33 +713,33 @@ server6 = do
713Here's how that server looks in action:
713Here's how that server looks in action:
716− $ curl --verbose http://localhost:8081/myfile.txt
716+$ curl --verbose http://localhost:8081/myfile.txt
718− * Connected to localhost (127.0.0.1) port 8081 (#0)
718+* Connected to localhost (127.0.0.1) port 8081 (#0)
719− > GET /myfile.txt HTTP/1.1
719+> GET /myfile.txt HTTP/1.1
720− > User-Agent: curl/7.30.0
720+> User-Agent: curl/7.30.0
721− > Host: localhost:8081
721+> Host: localhost:8081
722− > Accept: */*
722+> Accept: */*
724− < HTTP/1.1 404 Not Found
724+< HTTP/1.1 404 Not Found
726− myfile.txt just isnt there, please leave this server alone.
726+myfile.txt just isnt there, please leave this server alone.
728− $ echo Hello > myfile.txt
728+$ echo Hello > myfile.txt
730− $ curl --verbose http://localhost:8081/myfile.txt
730+$ curl --verbose http://localhost:8081/myfile.txt
732− * Connected to localhost (127.0.0.1) port 8081 (#0)
732+* Connected to localhost (127.0.0.1) port 8081 (#0)
733− > GET /myfile.txt HTTP/1.1
733+> GET /myfile.txt HTTP/1.1
734− > User-Agent: curl/7.30.0
734+> User-Agent: curl/7.30.0
735− > Host: localhost:8081
735+> Host: localhost:8081
736− > Accept: */*
736+> Accept: */*
738− < HTTP/1.1 200 OK
738+< HTTP/1.1 200 OK
740− < Content-Type: application/json
740+< Content-Type: application/json
742− {"content":"Hello\n"}
742+{"content":"Hello\n"}
745## Response headers
745## Response headers