我正在编写一个带有字节主体的python post请求: with open('srt_file.srt', 'rb') as f:
res = requests.postheaders={'Content-Type': 'application/octet-stream'}) 在服务器部分,我尝试解析正文: app = FastAPI我得到了422错误:{"detail":[{"loc&q
如何获得子模型列表中的键和值?下面是我做的代码,from pydantic import BaseModel
class Image(BaseModel我刚开始学习fastapi,我想我可以通过list of Image模型中的item.image.url或类似的东西来获得值,类似于item.name或item.tax,但是它不起作用。为了更详细地解释这个问题