Skip to content

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

Open
bfsheng wants to merge 1 commit intomosquito:masterfrom
bfsheng:master
Open

Update client.py to allow ssl context to be passed in#22
bfsheng wants to merge 1 commit intomosquito:masterfrom
bfsheng:master

Conversation

@bfsheng
Copy link
Copy Markdown

@bfsheng bfsheng commented Nov 23, 2018

so that it works with https

@mosquito
Copy link
Copy Markdown
Owner

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

@bfsheng
Copy link
Copy Markdown
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

def __remote_call(self, method_name, *args, **kwargs):
response = yield from self.client.post(
str(self.url),
ssl_context = self.ssl
Copy link
Copy Markdown
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
Copy Markdown
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.

3 participants