Closed Diaoul closed 7 years ago
Are you sure that you want to pass it into __init__
? I thought if someone will want to change it, the simple solution it is the inheriting.
class MyServerProxy(ServerProxy):
USER_AGENT="My User Agent"
Both are ok, I mainly wanted to avoid subclassing just for this. Even if I provide my own ClientSession with its own useragent it would be overridden.
Actually I could use the kwargs to pass arguments from the ServerProxy to the ClientSession with headers but that would be overridden as well.
So what I would expect from the ServerProxy (let me know if you agree):
This has the advantage of not needing any extra arguments.
I already added the headers
argument for the ServerProxy
in 0.6.0
. Please reopen this issue when that's not enough for you.
Although it's nice that the ServerProxy comes with its predefined UserAgent, I'd need to use my own. Could you please make it so it is an argument to
__init__
?