-
Notifications
You must be signed in to change notification settings - Fork 33
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
Proxy feature #201
Comments
As a workaround, you can probably set the standard |
This should already be possible by modifying the http session directly after you instantiate the API class in the same way you modify headers or other items. nautobot = pynautobot.api(
url = "https://demo.nautobot.com",
token = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
)
nautobot.http_session.proxies = {
"http": "http://my_super_proxy.com:1234",
"https": "https://my_super_proxy.com:1234",
} |
I though modifying the http session after the API instanciation would do the trick... but the api validation fails before exiting the call. I could catch the error and patch the session after all but I think that is not very clean. For now, I have just added 2 lines to the API |
Yes, I thought of that after giving you that update. We really need to change that auto-validation to happen during your first API call rather than on instantiation. |
It would be great to have a proxy option for api calls. We could hence do something like this.
The text was updated successfully, but these errors were encountered: