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

9 Replies, 1424 Views

Hey! For error handling, I’d recommend using `backoff` for exponential retries. It’s a game-changer when dealing with flaky servers in python http request to send request with long poll.

Also, if you’re not already, use `contextlib` for managing your resources. It keeps your code clean and ensures everything gets closed properly.

Lastly, don’t forget to monitor your long-polling endpoints. Tools like Prometheus can help you track timeouts and errors.

Messages In This Thread



Users browsing this thread: 1 Guest(s)