Added retries for post.
Added retries to the query method