Middlware on Expressive 3

My question is how to pass Middleware information to Application using the PSR-7 and PSR-15 implementations.

Middleware A;
Middleware B;
Application;

In this situation, how to manage the demand and response between middleware. I can only handle the request between the middleware.