MCPcopy
hub / github.com/mitmproxy/mitmproxy / get

Function get

release/release.py:17–24  ·  view source on GitHub ↗
(url: str)

Source from the content-addressed store, hash-verified

15
16
17def get(url: str) -> http.client.HTTPResponse:
18 assert url.startswith("https://")
19 host, path = re.split(r"(?=/)", url.removeprefix("https://"), maxsplit=1)
20 conn = http.client.HTTPSConnection(host)
21 conn.request("GET", path, headers={"User-Agent": "mitmproxy/release-bot"})
22 resp = conn.getresponse()
23 print(f"HTTP {resp.status} {resp.reason}")
24 return resp
25
26
27def get_json(url: str) -> dict:

Callers 2

get_jsonFunction · 0.70
release.pyFile · 0.70

Calls 2

splitMethod · 0.45
requestMethod · 0.45

Tested by

no test coverage detected