Chapter 3
Chapter 3
- http verb: POST
curl -i -H "Content-Type: application/json" -X POST -d "{\"prodID\":\"1\"}" http://localhost:8000/product- Body Parameters
- the value of each parameter of the body data is passed to the corresponding Body parameter declared in the operation function's definition. A Body parameter is an object of the
Bodyclass in FastAPI. - pydantic and sqlalchemy interoperation
- pydantic special fields:
SecretStr,HttpUrl,Json