(url: str)
| 15 | |
| 16 | |
| 17 | def 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 | |
| 27 | def get_json(url: str) -> dict: |
no test coverage detected