Catalog · How the catalog works
PascalRESTLearn
Learning to build a REST server using Pascal
Anyone may press Interesting, signed in or not. It helps others find this project.
README
PascalRESTLearn curates Pascal code examples for building REST servers, designed to support learning.
Status
Work in progress
Prerequisites
- make (tested with GNU Make)
- fpc (Free Pascal Compiler)
Build
makeRun
./hello_world_rest_serverUsage
With a running server:
curl http://localhost:8080/api/messageDict REST Server
Run
./dict_rest_serverUsage
Add item
curl -H 'Content-Type: application/json' \
-d '{"headword":"cat", "part_of_speech":"noun"}' \
localhost:8080/api/dictcurl -H 'Content-Type: application/json' \
-d '{"headword":"go", "part_of_speech":"verb"}' \
localhost:8080/api/dictGet items
curl localhost:8080/api/dict
