mirror of
https://github.com/NohamR/AM-Exporter.git
synced 2026-05-25 04:07:11 +00:00
server implementation
This commit is contained in:
17
testpost.py
Normal file
17
testpost.py
Normal 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)
|
||||
Reference in New Issue
Block a user