From d3794f6d94cb5a5a54ba3596967c127c49cd19d3 Mon Sep 17 00:00:00 2001 From: LeoOMaia Date: Sun, 26 Nov 2023 17:36:33 +0000 Subject: [PATCH] update --- client.py | 22 ---------------------- test.sh | 5 ----- 2 files changed, 27 deletions(-) delete mode 100644 client.py delete mode 100644 test.sh diff --git a/client.py b/client.py deleted file mode 100644 index 705b259..0000000 --- a/client.py +++ /dev/null @@ -1,22 +0,0 @@ -import requests -import sys -import json - -api_url = 'http://10.111.233.250:32196/api/recommend' - -if len(sys.argv) < 2: - print("Usage: python client.py ...") - sys.exit(1) - -input_playlist = sys.argv[1:] - -data = json.dumps({'songs': input_playlist}) - -headers = {'Content-Type': 'application/json'} - -response = requests.post(api_url, data=data, headers=headers) - -if response.status_code == 200: - print(response.json()) -else: - print(f"Error: {response.status_code}") \ No newline at end of file diff --git a/test.sh b/test.sh deleted file mode 100644 index a5989dc..0000000 --- a/test.sh +++ /dev/null @@ -1,5 +0,0 @@ -wget --server-response \ - --output-document response.out \ - --header='Content-Type: application/json' \ - --post-data '{"songs": ["Yesterday", "Bohemian Rhapsody"]}' \ - http://10.111.233.250:32171/api/recommend \ No newline at end of file