encode/httpx ? reverse-engineered prompt
Reverse engineered prompt
Build me a modern Python HTTP client library that feels easy to use like requests, but works with both normal and async code.
I want one package that can send web requests, handle cookies, redirects, uploads, streaming, timeouts, proxies, SSL verification, and compressed responses. It should support HTTP 1.1 and HTTP 2, and it should be able to talk directly to WSGI and ASGI apps too. Please also include a simple command line tool so I can make requests from the terminal and see useful output.
Make the public API clean and well documented, with good type hints and sensible defaults. Add tests for the main behaviors, and keep the project organized so it is easy to maintain. If you need to, look up current docs online to match the expected behavior of a modern Python client. I’d like the result to be polished, practical, and ready to use as a real library.
Are you gonna build this?
make sure you review the code using coderabbit