guzzle/guzzle ? reverse-engineered prompt

Reverse engineered prompt

Build me a PHP HTTP client library like Guzzle that makes it easy to send requests to web services and handle the response in a clean, simple way.

I want it to support the common stuff out of the box, like GET and POST requests, query strings, JSON bodies, cookies, file uploads, streaming large uploads and downloads, and both synchronous and asynchronous calls through one friendly interface. It should work with PSR 7 request, response, and stream objects, and also support PSR 18 so it plays nicely with other HTTP tools in the PHP ecosystem.

Please include a flexible middleware system so people can add things like logging, retries, auth, or custom behavior without fighting the client. Keep it transport agnostic so it does not depend too tightly on one specific HTTP engine. Add good docs, practical examples, and tests that show the main use cases. If you need to check current PHP or Composer docs along the way, go ahead and look them up online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab