(key: str)
| 817 | # Prioritize lowercase environment variables over uppercase |
| 818 | # to keep a consistent behaviour with other http projects (curl, wget). |
| 819 | def get_proxy(key: str) -> str | None: |
| 820 | return os.environ.get(key) or os.environ.get(key.upper()) |
| 821 | |
| 822 | # First check whether no_proxy is defined. If it is, check that the URL |
| 823 | # we're getting isn't in the no_proxy list. |
no test coverage detected