我能够从另一个API获得一个API的响应,但无法将其存储在某个地方(在返回响应之前存储在文件或其他东西中)
response=RedirectResponse(url="/apiname/")
(我想访问带有头和正文的post请求)
I want to store this response content without returning it.
是的,如果我返回函数,我将得到结果,但当我打印它时,我找不到结果。 另外,若我给出post请求,那个么我将得到找不到的错误实体
我阅读了starlette和fastapi文档,但无法找到解决方法。这些回调也没有帮助
我也有同样的问题&;我需要用async方式调用第三方API 所以我尝试了很多方法&;我带着requests-async library来解决这个问题 这对我很有用
httpx您也可以使用 this video他正在使用httpx
我没有直接使用fastapi/starlette来存储响应。但我找到了一个解决办法来完成这项任务
对于试图实施同一件事的人,请考虑这一点。 对李>
相关问题 更多 >
编程相关推荐