Retry http requests on connection error

Signed-off-by: Tom Wright <tom@inflatablecookie.com>