server implementation

This commit is contained in:
√(noham)²
2024-02-29 20:50:11 +01:00
parent 4eb09784d6
commit 37eb055d2c
3 changed files with 46 additions and 2 deletions

17
testpost.py Normal file
View File

@@ -0,0 +1,17 @@
import requests
import json
url = "http://127.0.0.1:5000"
payload = {
'key1': 'value1',
'key2': 'value2'
}
json_payload = json.dumps(payload)
headers = {'Content-Type': 'application/json'}
r = requests.post(url+'/set', data=json_payload, headers=headers)
r = requests.get(url+'/display')
print(r.text)