tools/scripts/httptest/httptest.py
2018-12-27 16:23:42 +08:00

18 lines
369 B
Python

# -*- coding: utf-8 -*-
import os
import sys
import json
import time
import urllib.parse
import urllib.request
from optparse import OptionParser
def do_test():
req = urllib.request.Request('http://127.0.0.1:9002/webapp/index.php?c=Ops&a=selfChecking1')
data = urllib.request.urlopen(req).readall()
print(data)
while True:
do_test()
time.sleep(.1)