Added the ability to retrieve the headers for an api request.