Receive form data
This commit is contained in:
@@ -23,5 +23,17 @@ class GameService:
|
||||
self.clock_service.stop()
|
||||
self.detection_service.stop()
|
||||
|
||||
def make_move(self) -> tuple[bytes, str]:
|
||||
return self.detection_service.analyze_single_frame()
|
||||
def make_move(self) -> None:
|
||||
try :
|
||||
frame, fen = self.detection_service.analyze_single_frame()
|
||||
print(fen)
|
||||
headers = {'Content-Type': 'image/jpeg'}
|
||||
body = {'frame': frame, 'fen': fen}
|
||||
response = requests.post(
|
||||
"https://192.168.15.125:1880/party/image",
|
||||
data=body,
|
||||
headers=headers,
|
||||
verify=False)
|
||||
print(response.status_code)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
Reference in New Issue
Block a user