"How to Use Python HTTP Request to Send a Request with Long Poll? Best Practices?"

9 Replies, 1381 Views

Hey! For modular code, I’d suggest breaking your python http request to send request with long poll logic into smaller functions.

One for sending the request, one for handling the response, and one for retries. It makes debugging way easier.

Also, if you’re into async, check out `anyio`—it’s a great abstraction over `asyncio` and `trio`.

Messages In This Thread



Users browsing this thread: 1 Guest(s)