add retrying request and returning headers