git.iko.soy/typeable/servant
on master help sign in
tutorial: corrected curl examples
commit027cd827252061a39d40dd443c28bdbe28709b3d authorSönke Hahn <soenkehahn@gmail.com> dateTue 1 Mar 2016, 19:47 (11 years ago) parent1b92887
1 file changed+2−2
doc/tutorial/Server.lhs+2−2
doc/tutorial/Server.lhs+2−2
@@ -297,12 +297,12 @@ And that's it. Here's the example in action:
297297
298298``` bash
299299$ curl http://localhost:8081/position/1/2
300−{"x":1,"y":2}
300+{"xCoord":1,"yCoord":2}
301301$ curl http://localhost:8081/hello
302302{"msg":"Hello, anonymous coward"}
303303$ curl http://localhost:8081/hello?name=Alp
304304{"msg":"Hello, Alp"}
305−$ curl -X POST -d '{"name":"Alp Mestanogullari", "email" : "alp@foo.com", "age": 25, "interested_in": ["haskell", "mathematics"]}' -H 'Accept: application/json' -H 'Content-type: application/json' http://localhost:8081/marketing
305+$ curl -X POST -d '{"clientName":"Alp Mestanogullari", "clientEmail" : "alp@foo.com", "clientAge": 25, "clientInterestedIn": ["haskell", "mathematics"]}' -H 'Accept: application/json' -H 'Content-type: application/json' http://localhost:8081/marketing
306306{"subject":"Hey Alp Mestanogullari, we miss you!","body":"Hi Alp Mestanogullari,\n\nSince you've recently turned 25, have you checked out our latest haskell, mathematics products? Give us a visit!","to":"alp@foo.com","from":"great@company.com"}
307307```
308308