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

How to disable SSL verification? #5

Closed
hf-kklein opened this issue Jun 5, 2020 · 1 comment
Closed

How to disable SSL verification? #5

hf-kklein opened this issue Jun 5, 2020 · 1 comment

Comments

@hf-kklein
Copy link

hf-kklein commented Jun 5, 2020

I'd like to pass an argument to the ClientSession to disable the SSL verification (for a testsystem with selfsigned cert), like described here

session = aiohhtp.ClientSession(connector=aiohttp.TCPConnector(verify_ssl=False))

Is there a possibility to pass arguments to the ClientSession with aiohttp-requests?

Edit: In case anyone needs this urgently you can modify the "private" variable that stores the session arguments:

from aiohttp_requests import requests
...
requests._session_args[1]["connector"] = aiohttp.TCPConnector(verify_ssl=False)
@maxzheng
Copy link
Owner

maxzheng commented Jun 5, 2020

The proper approach is to create your own requests instance from the Requests class like:

from aiohttp_requests import Requests
requests = Requests(connector=aiohttp.TCPConnector(verify_ssl=False))

@maxzheng maxzheng closed this as completed Jun 5, 2020
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

No branches or pull requests

2 participants