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

9 Replies, 1417 Views

Hey! Great thread. I’ve been working with python http request to send request with long poll for a while now, and one thing that saved me was using `httpx` instead of `requests`. It’s async by default and handles timeouts way better.

Also, for debugging, Postman is a lifesaver. You can mock long-polling endpoints and see how they behave before writing any code.

Oh, and if you’re dealing with flaky servers, check out `tenacity` for retries. It’s super flexible and easy to implement.

Messages In This Thread



Users browsing this thread: 1 Guest(s)