refactor async http client into separate file. add ability to repeat on timeouts