github.com/annchain/OG@v0.0.9/scripts/boostrap_server/run_test.py (about) 1 from requests import Session 2 3 if __name__ == '__main__': 4 s = Session() 5 s.trust_env = False 6 resp = s.get('http://127.0.0.1:8008/') 7 8 print(resp.text) 9 resp = s.get('http://127.0.0.1:8008/') 10 print(resp.text) 11 resp = s.get('http://127.0.0.1:8008/') 12 print(resp.text) 13 14 resp = s.post('http://127.0.0.1:8008/', json={"networkid": 1, "publickey": "0x01000000001", "partners": 4, 15 "onode": "onode://d2429ee@47.100.222.11:8001"}) 16 print(resp.text) 17 resp = s.post('http://127.0.0.1:8008/', json={"networkid": 1, "publickey": "0x01000000002", "partners": 4, 18 "onode": "onode://d2429ee@47.100.222.11:8001"}) 19 print(resp.text) 20 resp = s.post('http://127.0.0.1:8008/', json={"networkid": 1, "publickey": "0x01000000003", "partners": 4, 21 "onode": "onode://d2429ee@47.100.222.11:8001"}) 22 print(resp.text) 23 resp = s.post('http://127.0.0.1:8008/', json={"networkid": 1, "publickey": "0x01000000004", "partners": 4, 24 "onode": "onode://d2429ee@47.100.222.11:8001"}) 25 print(resp.text) 26 resp = s.post('http://127.0.0.1:8008/', json={"networkid": 1, "publickey": "0x01000000001", "partners": 4, 27 "onode": "onode://d2429ee@47.100.222.11:8001"}) 28 print(resp.text) 29 resp = s.post('http://127.0.0.1:8008/', json={"networkid": 1, "publickey": "0x01000000002", "partners": 4, 30 "onode": "onode://d2429ee@47.100.222.11:8001"}) 31 print(resp.text) 32 resp = s.post('http://127.0.0.1:8008/', json={"networkid": 1, "publickey": "0x01000000003", "partners": 4, 33 "onode": "onode://d2429ee@47.100.222.11:8001"}) 34 print(resp.text) 35 resp = s.post('http://127.0.0.1:8008/', json={"networkid": 1, "publickey": "0x01000000004", "partners": 4, 36 "onode": "onode://d2429ee@47.100.222.11:8001"}) 37 print(resp.text)