This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get response time not shown in /docs or /redoc similar to POSTMAN? #564
Comments
usually that would be implemented at the MiddleWare level, you can use
https://github.com/steinnes/timing-asgi
…On Tue, Sep 24, 2019 at 10:41 AM Sebastian Cheung CQF < ***@***.***> wrote:
*Description*
How can I show /docs or /redoc response time similar to that of POSTMAN?
*Additional context*
Add any other context or screenshots about the feature request here.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#564?email_source=notifications&email_token=AAINSPRW5SITQVJFTQ4GJOTQLHHEVA5CNFSM4IZ4TEDKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HNH5OPQ>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAINSPRFPIPSCRRTULW3RBTQLHHEVANCNFSM4IZ4TEDA>
.
--
benoit barthelet
http://pgp.mit.edu/pks/lookup?op=get&search=0xF150E01A72F6D2EE
|
Also, /docs and /redoc are showing an externally-provided interface, not something that is directly a part of FastAPI. The swagger UI has a github repo where you can post questions like this. |
You can also use a middleware to add an additional header. That's exactly the example in the docs: https://fastapi.tiangolo.com/tutorial/middleware/#create-a-middleware |
Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues. |
I still can not found any infos how to enable the information "Request duration" in Swagger UI, that appears after the request is done. In Flask ths can be enabled by I am also hosting the Swagger UI javascript locally (as static file), however, i could not find any variable that fits. |
@ycd how to set it, can you show me sample codes? |
@zffocussss you need to set it as follows: app = FastAPI(swagger_ui_parameters={"displayRequestDuration": True}) |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Description
How can I show /docs or /redoc response time similar to that of POSTMAN?
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: