ProxyPolicy Class
A proxy policy.
Dictionary mapping protocol or protocol and host to the URL of the proxy to be used on each Request.
- Inheritance
-
azure.core.pipeline.policies._base.SansIOHTTPPolicyProxyPolicy
Constructor
ProxyPolicy(proxies=None, **kwargs)
Parameters
Examples
Configuring a proxy policy.
from azure.core.pipeline.policies import ProxyPolicy
proxy_policy = ProxyPolicy()
# Example
proxy_policy.proxies = {'http': 'http://10.10.1.10:3148'}
# Use basic auth
proxy_policy.proxies = {'https': 'http://user:password@10.10.1.10:1180/'}
# You can also configure proxies by setting the environment variables
# HTTP_PROXY and HTTPS_PROXY.
Methods
| on_request |
Is executed before sending the request from next policy. |
on_request
Is executed before sending the request from next policy.
on_request(request: azure.core.pipeline.PipelineRequest) -> None
Parameters
Feedback
Submit and view feedback for