How to tell httpie to retry for n times if the first connection failed?
Asked
Active
Viewed 558 times
1 Answers
2
I don't think that httpie has this functionality built-in, but since it is just a command-line tool, you can use some sort of retry-method in whichever shell you use httpie... For example, in bash
something like:
# Retry the 5 times command if returned exit code is not 0
for i in {1..5}; do http httpie.orgs && break || echo "Retrying..."; done

errata
- 5,695
- 10
- 54
- 99