记录浏览器原型的 Native 与页面切换实测

This commit is contained in:
2026-09-25 20:13:32 +00:00
parent dcf634d805
commit 2840f58397
2 changed files with 29 additions and 0 deletions
+2
View File
@@ -59,6 +59,8 @@ def main():
def request(path, authenticated=False):
headers = {'Accept': 'text/plain' if authenticated and path == '/actuator/prometheus' else 'application/json'}
if path == '/preview':
headers['Accept'] = 'text/html'
if authenticated:
headers['Authorization'] = f'Basic {basic}'
req = urllib.request.Request(base_url + path, headers=headers)