Re: Minimal HTTP middleware

2017-05-21 Thread Matthieu Napoli
Hi Michael, those are interesting points, my answers inline: On Sunday 21 may 2017 10:43:57 UTC+2, Michael Mayer wrote : > > > On Saturday, May 20, 2017 at 10:33:33 PM UTC+2, Matthieu Napoli wrote: > >> Rasmus: >> >> I can see the handler-interface having 3 uses in the context of PSR-15: >>> …

Re: Minimal HTTP middleware

2017-05-21 Thread Oscar Otero
I just read this discussion, and if I understand correctly, you’re proposing something like this: PSR-15 Psr\Http\ServerMiddleware\MiddlewareInterface::process(ServerRequestInterface $request, ServerRequestHandlerInterface $handler): ResponseInterface PSR-18 ? (naming under discussion)

Re: Minimal HTTP middleware

2017-05-21 Thread Rasmus Schultz
If I had to summarize all of my thinking about this subject into a single statement, it would be this: The interface that describes any component that takes a Request and must return a Response, is the most fundamental transaction we can meaningfully describe. That is, at the highest level, the

Re: Minimal HTTP middleware

2017-05-21 Thread Michael Mayer
For clarification: I'm still undecided about the usefulness of the two modifier interfaces (described in this thread as "$request = $foo ->modify($request);" and "$response = $foo->modify($response);"). I've added them to the hms proposal