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

Freshen up Middleware docs #6554

Merged
merged 3 commits into from
Jul 24, 2022
Merged

Conversation

danicheg
Copy link
Member

Fixes #5086.
I did it very straightforwardly. If you have something to add, let me know.

@mergify mergify bot added series/0.23 PRs targeting 0.23.x docs Relates to our website or tutorials labels Jul 21, 2022
@@ -1,14 +1,13 @@
# Middleware

A middleware is a wrapper around a [service] that provides a means of manipulating
Copy link
Member Author

@danicheg danicheg Jul 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can be biased, but explaining things using 'wrapper' doesn't help much.

Copy link
Member

@ChristopherDavenport ChristopherDavenport left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love it, theres a fix thats still needed but I like it a lot.

@ChristopherDavenport
Copy link
Member

My wonder I've always had is what if we generally omitted the Request[F] to just call in Request docs. This is more a discussion point than something I want to see addressed here. That way when explaining it would look like Request => F[Option[Response]] which hides the noise that has to do with the internal stream bodies.

Co-authored-by: Christopher Davenport <chris@christopherdavenport.tech>
@danicheg
Copy link
Member Author

I think that hiding the F type parameter is absolutely legit in docs, especially when we're explaining things using pseudo-code. And vice versa, every code snippet should be compiled and ready for copy-pasting by users.

@danicheg danicheg merged commit 71df6d7 into http4s:series/0.23 Jul 24, 2022
@danicheg danicheg deleted the middleware.md branch July 24, 2022 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Relates to our website or tutorials series/0.23 PRs targeting 0.23.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

middleware.md still refers to HttpService
2 participants