Comments (4)
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"
from aiohttp-xmlrpc.
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.
from aiohttp-xmlrpc.
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):
- If I have a custom user agent in my custom client it doesn't override it
- If I supply my custom user agent through kwargs it doesn't override it
- Otherwise override it
This has the advantage of not needing any extra arguments.
from aiohttp-xmlrpc.
I already added the headers
argument for the ServerProxy
in 0.6.0
. Please reopen this issue when that's not enough for you.
from aiohttp-xmlrpc.
Related Issues (15)
- PyPI version
- TypeError raised when response contains an empty base64 tag
- Multiple result is not parsed
- Add support for Python 3.6/3.7 and aiohttp 3+ HOT 1
- kwargs parsing seems incorrect HOT 3
- Remove @asyncio.coroutine + 3.4 Support HOT 4
- Problems closing aiohttp-xmlrpc aiohttps clients cleanly HOT 1
- FileNotFound when install 0.4.0 HOT 1
- 1.2.0 Wheel release
- Support for system.multicall HOT 3
- Support for introspection api
- Empty string values become the string literal "None" HOT 1
- Support for nested function calls HOT 7
- Limited XXE attack ability
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aiohttp-xmlrpc.