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

HTTP middleware trait #492

Closed
Thomasdezeeuw opened this issue Sep 19, 2021 · 0 comments · Fixed by #509
Closed

HTTP middleware trait #492

Thomasdezeeuw opened this issue Sep 19, 2021 · 0 comments · Fixed by #509
Labels
HTTP Related to the Heph-HTTP crate. idea An idea, open to discussion.

Comments

@Thomasdezeeuw
Copy link
Owner

Something like the following.

pub trait Middleware {
    type Handler: Future<Output = io::Result<Response>>;
    fn call<S>(&self, request: Request, next: S) -> Self::Handler
        where S: Service;
}

Where Service comes from #491.

Blocked on #491.

@Thomasdezeeuw Thomasdezeeuw added idea An idea, open to discussion. HTTP Related to the Heph-HTTP crate. labels Sep 19, 2021
@Thomasdezeeuw Thomasdezeeuw mentioned this issue Sep 19, 2021
57 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HTTP Related to the Heph-HTTP crate. idea An idea, open to discussion.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant