MCPcopy Create free account
hub / github.com/InternScience/SciReason / check_http

Function check_http

opencompass/utils/network.py:74–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72
73 # Method 2: HTTP request test (supports proxy)
74 def check_http() -> bool:
75 try:
76 response = requests.get('http://www.google.com',
77 timeout=timeout,
78 proxies=proxies)
79 return response.status_code == 200
80 except requests.RequestException:
81 return False
82
83 # Method 3: Ping test (direct connection, no proxy)
84 def check_ping() -> bool:

Callers 1

Calls 1

getMethod · 0.80

Tested by

no test coverage detected