Skip to content
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

Please actually document the middleware API #735

Open
fresheneesz opened this issue Dec 19, 2022 · 1 comment
Open

Please actually document the middleware API #735

fresheneesz opened this issue Dec 19, 2022 · 1 comment

Comments

@fresheneesz
Copy link

The documentation on middleware just says "You can write your own middleware." and has an example that is entirely unexplained. This really needs real documentation. What order are they called in? Does next have any parameters? Would definitely be worth spelling out that "the middelware function is called for every matching endpoint before the request handler is run and calling 'await next()' will wait for the response to be sent before being run" (or whatever is actually the case). As it stands, way too much has to be assumed or inferred by this.

@yusukebe
Copy link
Member

Hi @fresheneesz

Thank you for creating the issue. You are right, it's poor. We'll write it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants