While I am familiar with HTTP servers and event loops, I am having some problems understanding the Python asyncio internals .
As a training exercise, I am trying to write a minimal HTTP server (only an echo request of the request method, URI, headers and body) without additional dependencies. I looked at aiohttp and aiowsgi for reference, but not understanding what is happening there - partly because of the perceived complexity of protocols, transport, etc. a little overwhelming. So Iβm stuck right now because I donβt know where to start.
Is it naive to expect that these are just a few lines of code to establish a connection, consume an incoming text stream and send another text stream?
source share