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

Middlewares in http module #47

Closed
pepe opened this issue Oct 6, 2021 · 4 comments
Closed

Middlewares in http module #47

pepe opened this issue Oct 6, 2021 · 4 comments

Comments

@pepe
Copy link
Member

pepe commented Oct 6, 2021

Part of the circlet library was a small collection of middleware. We could add this to the HTTP module as well, if only as examples.

What do you think?

@bakpakin
Copy link
Member

bakpakin commented Oct 6, 2021

Yeah, middleware makes sense and I don't see a problem with it. Still, it should be farily minimalist imo, just simple things like a generic server handler, or auth handler, or logging handler, etc.

@pepe
Copy link
Member Author

pepe commented Oct 7, 2021

Indeed that is what I had on my mind. Circlet contains:

  • middleware for coercing to middleware
  • router very simple router
  • logger printing logger
  • cookies extracting

I would guess it is enough for the HTTP module too, and I can copy them verbatim from circlet if you agree or tell me which to copy.

@bakpakin
Copy link
Member

I have copied over and modified all of the above middleware, and added a parser for query-strings (that was built into circlet).

@pepe
Copy link
Member Author

pepe commented Oct 24, 2021

I guess this new incarnation of Middleware is fine work. Thank you ❤️

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