Open a URL with basic authentication if username and password are provided. Can raise urllib.error.URLError if there is an error.
(url: str, auth_headers: dict[str, str])
| 812 | |
| 813 | |
| 814 | def urlopen(url: str, auth_headers: dict[str, str]) -> http.client.HTTPResponse: |
| 815 | """ |
| 816 | Open a URL with basic authentication if username and password are provided. Can raise urllib.error.URLError if there is an error. |
| 817 | """ |
| 818 | request = urllib.request.Request(url, headers=auth_headers) |
| 819 | return urllib.request.urlopen(request) |
no outgoing calls
no test coverage detected