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

9 Replies, 1527 Views

Oh man, long polling can be a nightmare if you don’t handle timeouts properly. I’ve been there.

One tip: use `asyncio.wait_for` with `aiohttp` to set timeouts for your python http request to send request with long poll. It’s way cleaner than handling timeouts manually.

Also, if you’re dealing with rate limits, `ratelimit` is a great library to handle that.

Messages In This Thread



Users browsing this thread: 1 Guest(s)