admin管理员组文章数量:1390192
I have an connexion.AsyncApp
in python. A snippet of the code looks like this:
app = AsyncApp(__name__)
app.add_api("openapi.yaml", arguments={"title": "Async APP API"})
if __name__ == "__main__":
uvicorn.run(app, host="127.0.0.1", port=8000)
I've been trying to determine how to access the route of an incoming request. I attempted to add middleware before SwaggerUIMiddleware
using self.app.add_middleware()
, assuming the route information would be available at that point. However, after inspecting the object received in the middleware, I couldn't find any member variables containing this information.
I sent a request to an endpoint similar to /greetings/{user}
but couldn't see the route with {user}
as a placeholder. Instead, I only saw the actual username.
Is there no easy way to find the route information with connexion async app?
本文标签: How to get route of request from connexionAsyncApp in pythonStack Overflow
版权声明:本文标题:How to get route of request from connexion.AsyncApp in python? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744640678a2617100.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论