snapshot before merge

This commit is contained in:
zqlit committed 2026-06-01 17:57:22 +08:00
1 parent 06a5f3da4d
commit 671871e0b2
145 files changed
+9786 -59

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
import urllib.request, json
# 1. write-go root
try:
r = urllib.request.urlopen('http://localhost:8016/', timeout=5)
print('8016 / :', r.status)
except Exception as e:
print('8016 / : ERROR -', e)
# 2. write-go admin page (fe)
try:
r = urllib.request.urlopen('http://localhost:8016/admin', timeout=5)
print('8016 /admin:', r.status)
except Exception as e:
print('8016 /admin: ERROR -', e)
# 3. bot-go status
try:
r = urllib.request.urlopen('http://127.0.0.1:8017/status', timeout=5)
d = json.loads(r.read().decode())
print('8017 /status:', d)
except Exception as e:
print('8017 /status: ERROR -', e)
# 4. bot-go start
try:
req = urllib.request.Request('http://127.0.0.1:8017/start', method='POST')
r = urllib.request.urlopen(req, timeout=5)
print('8017 /start:', r.status, r.read().decode()[:200])
except Exception as e:
print('8017 /start: ERROR -', e)
# 5. bot-go stop
try:
req = urllib.request.Request('http://127.0.0.1:8017/stop', method='POST')
r = urllib.request.urlopen(req, timeout=5)
print('8017 /stop:', r.status, r.read().decode()[:200])
except Exception as e:
print('8017 /stop: ERROR -', e)