mirror of
https://git.roussel.pro/telecom-paris/pact.git
synced 2026-02-09 10:30:17 +01:00
ajout endpoint POST pour ajout avis
This commit is contained in:
14
code/server/exemple_utilisation.py
Normal file
14
code/server/exemple_utilisation.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import requests
|
||||
|
||||
avis = {
|
||||
"auteur_age": 20,
|
||||
"auteur_sexe": 'f',
|
||||
"note": 8,
|
||||
"source": "borne",
|
||||
#Optionel
|
||||
"notes_autre": '{"service":8,"accueil":30}',
|
||||
"commentaire": "Commentaire"
|
||||
}
|
||||
|
||||
res = requests.post("http://localhost:8080/add_review", data=avis)
|
||||
print(res.text)
|
||||
Reference in New Issue
Block a user