test_test_api.txt 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import requests
  2. service_url = 'http://192.168.0.15:8802'
  3. # service_url = 'http://192.168.0.16:8802'
  4. # service_url = 'http://192.168.1.233:8802'
  5. # --- test test api ---
  6. print(requests.post(url=f'{service_url}/api', json={'module': 'TEST', 'method': 'test002'}).text)
  7. # print(requests.post(url=f'{service_url}/api', json={'module': 'TEST', 'method': 'test015'}).text)
  8. # --- test test001 导入人脸数据 ---
  9. # response = requests.post(url=f'{service_url}/api', json={'module': 'TEST', 'method': 'test001'})
  10. # print(response.text)
  11. # --- test test002 启动循环检查指定rtsp地址 ---
  12. # data = {
  13. # 'module': 'TEST',
  14. # 'method': 'test002',
  15. # # 'rtsp_addr': 'rtsp://admin:DEVdev123@192.168.30.233:554/cam/realmonitor?channel=1&subtype=0', # 大华
  16. # 'rtsp_addr': 'rtsp://admin:DEVdev123@192.168.30.235:554/h264/ch1/sub/av_stream', # 海康
  17. # }
  18. # response = requests.post(url=f'{service_url}/api', json=data)
  19. # print(response.text)
  20. # --- test test006 ---
  21. # data = {
  22. # 'module': 'TEST',
  23. # 'method': 'test006',
  24. # }
  25. # response = requests.post(url=f'{service_url}/api', json=data)
  26. # print(response.text)
  27. # --- test test003 ---
  28. # data = {
  29. # 'module': 'TEST',
  30. # 'method': 'test003',
  31. # 'line_id': '112233',
  32. # }
  33. # response = requests.post(url=f'{service_url}/api', json=data)
  34. # print(response.text)