My Python application makes a lot of HTTP requests using the urllib2
module. This application might be used over very unreliable networks where latencies could be low and dropped packets and network timeouts might be very common. Is is possible to override a part of the urllib2
module so that each request is retried an X number of times before raising any exceptions? Has anyone seen something like this?
Can i achieve this without modifying my whole application and just creating a wrapper over the urllib2
module. Thus any code making requests using this module automatically gets to use the retry functionality.
Thanks.