My simple exercise playing with Flask Rest and Python
docker build -t my-python-api .
docker run -d -p 5000:5000 my-python-api
GET:
curl http://localhost:5000/user/Jorge
POST:
curl -X POST -H "Content-Type: application/json" -d '{"name": "Alfred", "age": 34, "occupation": "Cellist"}' http://localhost:5000/user/Alfred
PUT:
curl -X PUT -H "Content-Type: application/json" -d '{"name": "Tom", "age": 25, "occupation": "Tennis Player"}' http://localhost:5000/user/Alice
DELETE:
curl -X DELETE http://localhost:5000/user/Jorge