Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update client.py to allow ssl context to be passed in #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bfsheng
Copy link

@bfsheng bfsheng commented Nov 23, 2018

so that it works with https

@mosquito
Copy link
Owner

You might pass ssl_context argument to to the __init__'s **kwargs. This will be passed to the aiohttp.Session.

@bfsheng
Copy link
Author

bfsheng commented Nov 25, 2018

Hi mosquitor, it seems that it needs to be added to post() in __remote_call(). Parameters added to **kwargs will only be part of the data in the xmlrpc request. regards, bob

@@ -89,6 +90,7 @@ def _parse_response(body, method_name):
def __remote_call(self, method_name, *args, **kwargs):
response = yield from self.client.post(
str(self.url),
ssl_context = self.ssl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ssl_context is deprecated

@graingert
Copy link
Contributor

Hi mosquitor, it seems that it needs to be added to post() in __remote_call(). Parameters added to **kwargs will only be part of the data in the xmlrpc request. regards, bob

@bfsheng @mosquito you can apply ssl kwargs globally with ServerProxy(connector=TCPConnector(ssl=...))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants