本文适合对web请求不够熟悉的后端新手。
有些概念不太清楚,但动手做起来先。
更多 fastapi 使用可见我的博客:https://so.csdn.net/so/search?q=fastapi&t=blog&u=lovechris00
或者官方文档:https://fastapi.tiangolo.com
注意:postman 在线web测试,可能无法连接你本地的接口,因为不在一个局域网。
api 启动后,你可以访问对应的 docs,如 http://127.0.0.1:8124/docs#/
get
from fastapi import FastAPI, Form, Request