Adding autoretries to the http post function