I know how to get at the response headers of a urllib2 request and also how to access those sent and print them out and the request is made, as detailed in the responses to this question.
However, I need to intercept the request after the default headers, such as 'Content-Type' are added by the OpenerDirector, but before, the request is actually sent, because I need to add an extra authorization header (to do with the API I'm working with) which is a hash of various things, including all of the standard headers on the request.
Note also I am using my own subclass of Request, which enables me to send PUT/HEAD/DELETE requests in addition to GET/POST ones and this functionality must be preserved by any solution to this new problem I am having.
TL;DR: Need to access all the default headers added by the OpenerDirector and use them to add a new header before the request is actually sent.