You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
442 B
21 lines
442 B
import time
|
|
import requests
|
|
|
|
url = 'http://arena0.andrew.cmu.edu:10000/depth_to_xyz'
|
|
|
|
payload = open('0_depth.png', 'rb')
|
|
|
|
img = None
|
|
|
|
response = requests.post(url, data=payload)
|
|
img = response.content
|
|
time.sleep(1)
|
|
print("single request works!")
|
|
|
|
for i in range(100):
|
|
payload = open('0_depth.png', 'rb')
|
|
response = requests.post(url, data=payload)
|
|
img = response.content
|
|
time.sleep(1)
|
|
print(f"multi request #{i} works!")
|