If you are developing a library that needs to make HTTP requests, here's how not to make it difficult for your consumers.
If you've ever implemented an HTTP API in PHP, you probably know that there's one thing you have to do over and over and over: parse the request body and validate the resulting structure. Now that we have PSR-15, let's use a middleware for that!
I am a full-stack web developer from Brno, Czech Republic. I contribute to open-source projects, write a technical blog, and speak at meetups and conferences.