MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / urlopen

Function urlopen

tools/tasks.py:814–819  ·  view source on GitHub ↗

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])

Source from the content-addressed store, hash-verified

812
813
814def 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)

Callers 5

make_collect_logs_tasksFunction · 0.90
get_db_listFunction · 0.90
get_paths_from_expvarsFunction · 0.90
can_connect_to_sg_urlFunction · 0.90
python_curl_taskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected