http retry snippet