Python 3 Requests or urllib - how to always add a header?
<p>Title says it all: is there a 'best' way to always add a header to every request? I've got an internal tool that wants to send request ids to other internal tools; I'm looking for a blessed solution. I've skimmed the docs of both and it seems that this isn't a popular thing to ask for as I can't find a cookbook example.</p>

<p>I'm thinking of a couple solutions:</p>

<ol>
<li>Wrap requests in my own thin wrapper and use that. Need to teach codevelopers to remember to not <code>import requests</code> but <code>import myrequestswrapper as requests</code>.</li>
<li>Monkey-patch requests. I don't like monkey patching, but maybe just this once...? I dread the time when there comes a need to <em>not</em> send a header to this one particular system.</li>
</ol>

<p>edit: Why I'm not considering a requests.Session: it stores cookies and needs to be disposed of as it keeps its connection open.</p>